-
Notifications
You must be signed in to change notification settings - Fork 24
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
Increase idle timeout #159
Comments
Hi, thanks for your interest in grobid-quantities. I've reformatted the issue to make it more readable. How many requests are you sending? In this case the requests get rejected because you're sending more than the allowed parallel request. There is an option in the When is set to 0, it will limit to the number of CPUs available. How many CPUs do you have? Let me know if you have more questions |
Thank you so much for response. This above log is part of load testing. So requests per second could be around ~50. And hence I understand a lot of them would fail.
2 My understanding is this:
This is little confusing. Can you elaborate on this? If idleTimeout is set to 120s, the extra requests should remain suspended in queue and their connection will be closed if they remain idle for more than 120s. Correct? |
OK, I was mistaken with the grobid PDF documents processing. I have implemented this long time ago, for the trouble. For this case, there is another parameter in the QoSFilter, which is called "waitMs" defaulted 50ms. If you can rebuild grobid-quantities, you could try by adding this line in line 81 of GrobidQuantitiesApplication
That should change the waiting time to 120 ms. You can enlarge it more based on your needs. if this works we can add it as parameter from the configuration. Another thing I suggest is to make sure the client handle the 503 response and wait before requesting again. The python client should do that already: https://github.com/lfoppiano/grobid-quantities-python-client/ |
Thank you. This is very helpful. I will update this thread with the feedback once i rerun the service after rebuilding. |
I've made the modification in the branch |
@uneetsingh did you manage to do any progress on this? I'd like to release 0.7.3 before the end of the month, including this PR if this solution is working. Could you share your script, I'd like to try to reproduce the same behaviour you reported. |
I tried this and the issue still persisted i.e. requests that took more than 30s failed with 503 status. And apologies couldn't test using the new branch that you have pushed. Regarding error reproduction, I was doing load testing using locust. Below is the simple code
I was spawning 100 users with with Spawn rate as 10. [Update] |
Thanks! I've revised a bit the matter, and I think the I've revised the locust test I had written some time ago, you can find an old updated test in I've started the server with maxParallelRequest:2 and waitMs: 1, and I've ran a test with 100 users for 10 minutes, and I did not get any failure. See report: Then I tried with 10000 users and it started failing after 2000 parallel users: I suppose it's also related to the amount of threads and queue that are allocated, see from the config.yaml:
Your script also uses the processTextQuantity, I wonder, are you sure there were requests that took more than 30s to be completed? Could you check that? It's quite strange that this could happens with text requests |
Thank you! From the report's you have posted also, it is clear there seems to be some threshold of 30s(10000 users report) as the response time has an upper cap of 30s and the response time curve is maturing at 30s. I was trying to increase this threshold. I tried changing the maxThreads, maxQueuedRequests, acceptQueueSize also but that no headway here also. Whether this 503 failure happens at 100 users or 10000 users depend on the size of the payload. The payload which I was sending was three four paragraphs long.
Yes it does. If you see the logs which I have posted in the issue description, that's the same endpoint. |
@uneetsingh you're right! I did not see it... indeed! I think now I understood what you mean. I tried to change the parameter idleTimeout but as you said since the beginning 😅 it's not working. The only solution could be this: dropwizard/dropwizard#1674 (comment) but I'm not so sure is doable... |
@lfoppiano That's okay! 😅 You have been helping throughout. I really appreciate that. The dropwizard issue you have pointed to seems to address the problem directly. Will try to do it. What is key here is the meaning of idleTimeout. That dropwizard issue at least clears that. Will update if I have any solution for this. Thanks a lot again. |
Thank you! By the way, I'm planning to update grobid-quantities to dropwizard 4 at some point (in #136, although it says dropwizard 2) and we might end up having this fixed with a more recent version of jetty. I'm not sure. |
@uneetsingh I'm preparing for the new release 0.8.0 that among updating grobid, updates dropwizard to version 4. |
Hi @lfoppiano, No headway on that issue. I hope that Version 4 will solve this. |
I've merged PR #136 in the master. I did some tests, although the logs don't mention any timeout. I see some 503 after the timeout requests are reaching 30s. Here there was a fix in Jetty 10 to make the idle-timeout work, however, I'm not sure what else could be. |
Hi! I have been attempting to increase the idleTimeout but seems like it remain the default 30 seconds only.
Even though here idleTimout is set to 120 seconds, jetty is still enforcing it's default 30s as timeout. Below are few logs to make the case:
The text was updated successfully, but these errors were encountered: