Defect #33148
openapplication stuck if query with filter "Issue" and with large amount of IssueIDs
0%
Description
Project -> Issue,
Add filter "Issue", operator "Is", value: please input a lot of IDs, such as 1,2,3,4,5,6,7.
If the amount of the IDs is too large (in my case, more than 200 IDs), the query is stuck, and there is not SIGQUIT signal sent to webserver to terminal the request.
The webserver will keep waiting for the application to response the request, passenger-status shows the CPU usages of the redmine process is 100%.
At this point, the webserver process can not response for further requests.
If you continue retry the query for more times to make all webserver process are occupied, all users can not use the webserver (always loading).
Please set the timeout for requests.
Updated by Mizuki ISHIKAWA over 4 years ago
I think it is common to time out on a web server such as Apache or Nginx instead of a Rails application.
Updated by Taine Woo over 4 years ago
Mizuki ISHIKAWA wrote:
I think it is common to time out on a web server such as Apache or Nginx instead of a Rails application.
Ruby application host Passenger provides a configuration option for request timeout, but it requires Enterprise version of Passenger.
I use apache and open source passenger so i can not use this option.
And it also suggests application should handle the request instead of the work around provide by application host.
https://www.phusionpassenger.com/library/config/apache/reference/#passengermaxrequesttime
"This option should be considered as a workaround for misbehaving applications. It is advised that you fix the problem in your application rather than relying on this option as a measure to avoid stuck applications."
Updated by Taine Woo over 4 years ago
Taine Woo wrote:
Mizuki ISHIKAWA wrote:
I think it is common to time out on a web server such as Apache or Nginx instead of a Rails application.
Ruby application host Passenger provides a configuration option for request timeout, but it requires Enterprise version of Passenger.
I use apache and open source passenger so i can not use this option.
And it also suggests application should handle the request instead of the work around provide by application host.
https://www.phusionpassenger.com/library/config/apache/reference/#passengermaxrequesttime"This option should be considered as a workaround for misbehaving applications. It is advised that you fix the problem in your application rather than relying on this option as a measure to avoid stuck applications."
And the KeepAlive option of apache is not working for this case, because the application host passenger is working but waiting for the application Redmine, but the application Redmine stucks without return/kill.
Updated by Taine Woo over 4 years ago
But anyway, why is the query performance so bad...?
with only 200 query
Updated by Taine Woo over 4 years ago
----------- Application groups -----------
/xxxxxx/redmine-4.0.3 (production):
App root: /xxxxxx/redmine-4.0.3
Requests in queue: 0
* PID: 17124 Sessions: 1 Processed: 3 Uptime: 1m 4s
CPU: 37% Memory : 176M Last used: 17s ago
.....
.....
.....
after the redmine application stuck for some minutes, the CPU usage became 100%,
----------- Application groups -----------
/xxxxx/redmine-4.0.3 (production):
App root: /xxxxx/redmine-4.0.3
Requests in queue: 0
* PID: 17124 Sessions: 1 Processed: 3 Uptime: 8m 32s
CPU: 91% Memory : 176M Last used: 7m 45s ago
and during all time, this process of application can not accept other request, so the application host passenger have to start another application process to host redmine.
and if there is another 200 ID query, the new process will be stuck too.
So, after some tries by the user, all the server resource will be occupied, and reach the max process allowed of passenger, and then, no one can browse the web server again, because the application host (passenger but not web server apache) is out of resource.
Updated by Mizuki ISHIKAWA over 4 years ago
Taine Woo Woo
I understand why you need the timeout function. Thanks for the details!
Updated by Taine Woo over 4 years ago
Mizuki ISHIKAWA wrote:
Taine Woo Woo
I understand why you need the timeout function. Thanks for the details!
Hi Mizuki,
It would be good if the query for case "=" is refined. for several Ids, the query should uses "where xxx IN (aa,bb,cc,dd)". The sql executes very smooth. But the code makes the query stuck.