-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Module stops working under high load #6
Comments
is there anything before all those error messages? |
Aside from the start up messages, no:
|
How does the socket (/tmp/mtr.*) look like if that happens? Is it gone? |
Nope. the file is still there, with the correct permissions:
|
I have attached strace to the process which might help to debug this. This is from a single process. It seems it all goes well up until a certain point. The socket call always gets fd/17 in this case. Then suddenly it uses a fd/31 and it fails. What is interesting that in the strace the socket() call always comes first, handing out the fd/17. But in the case where it goes wrong, the write() comes BEFORE the socket() call. Might this be a threading race condition?
|
During some testing with Setting |
Hello. I'd like to re-open this. We've been trying to troubleshoot this issue as ever increasing the I've modded my version of the module to include lots more debug lines for opening/closing/re-using connections and I came to the conclusion that it seems that there is a multi-threading issue. It seems that file descriptors are swapping over.
This logs shows the thread With this idea, i switched over from I am not well versed in C so I can't really make any suggestions, but it seems to me that some threading fixes are required. Interested to hear what your thoughts are. If you require any more information, please don't hesitate to contact me! |
it's hard to add my 2cents without a deep dive here. Setting |
Ow definitely a descriptor leak. Sorry, that would have been good information to add. here you can see the open_files from our pods. The sea-saw is from increasing descriptors, and us reloaded the apache process. on the right you can see the impact of switching to pre-fork module. These are ALL open descriptors on the system btw. So the right graph is higher in general due to more processes instead of threads. But it flatlines nicely. It's actually quite easy to reproduce in a docker container. Just a normal httpd install with a single vhost. I did an docker was build with an centos7-base and used centos provided packages. No custom builds, no other modules apart from the normal provided ones. |
Hi,
Every time our webservers gets a large volume of requests (between 500 - 1000 req/sec), the module stops working.
The logs show the following:
When CURLing the /metrics endpoint I've created, most of the time it responds with a 500 error instead of showing the metrics.
I'm running Apache/2.4.6 (CentOS), module version 0.3.0.
The text was updated successfully, but these errors were encountered: