JMeter test File Upload interface error: Connection reset by Peer:socket write error

Source: Internet
Author: User
Tags connection reset

When setting the number of 150 threads concurrently during the performance test on the file upload interface, the following error always occurs: Connection reset by Peer:socket write error

Search the internet for a bit, get the reasons for these:

The number of concurrent connections to the server exceeds its capacity, and the server will drop some of the connections;
The client shuts down the browser, and the server is sending data to the client;
The browser side presses stop;

and development discussed with a half-day, who can not say why. Development said background Tomcat did not error, not the problem of code, will be the problem of tools, and then found an article on the Internet:

Workaround for JMeter encountering a line subroutines reset (Connection reset by Peer:socket write error)

It is useless to configure jmeter according to the article.

Later still a development great God found the wrong reason, originally, when JMeter error, background Tomcat did not error, but backstage nginx Error!!! Since the server only has 80 ports open, the developer uses Nginx to reverse-proxy the application's port, and the back-to-back port is 80, allowing the test machine to access the application.

Test is really nginx problem: The application port is changed directly to 80, closed Nginx test, the results show no more error, this proves that this error is actually caused by nginx. After testing, change the port back.

The error message in D:\nginx-1.15.0\logs\error.log is as follows:

malloc (31457280) failed (8:not enough storage is available to process this command)

Many people on the internet said Nginx memory is not enough, but no one specifically said how to solve. It is useless to try to modify some of Nginx's configuration (probably not to the point).

Later, the Nginx load balancer was changed to Apache Load balancer, which found that the error was more performance worse.

Finally, the great God will be nginx 32-bit changed to Nginx 64-bit (in the official website did not find 64, or on a website downloaded), found that performance greatly improved.

Test found that the number of concurrent 300 threads, JMeter no error!!!

Of course a long time concurrency, occasionally there will be connection reset by Peer:socket write error This mistake occurred, but overall interface performance has greatly improved.

Although still do not fully understand the cause of this error and solution, but it is a little progress, in this record, but also to you encounter this problem of friends a little thought.

JMeter test File Upload interface error: Connection reset by Peer:socket write error

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.