プロジェクト

全般

プロフィール

Vote #80751

未完了

application stuck if query with filter "Issue" and with large amount of IssueIDs

Admin Redmine さんが約2年前に追加. 約2年前に更新.

ステータス:
New
優先度:
通常
担当者:
-
カテゴリ:
Issues filter_56
対象バージョン:
-
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
56
version_id:
0
issue_org_id:
33148
author_id:
393064
assigned_to_id:
0
comments:
7
status_id:
1
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[New]

説明

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.


journals

I think it is common to time out on a web server such as Apache or Nginx instead of a Rails application.
--------------------------------------------------------------------------------
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."
--------------------------------------------------------------------------------
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.
--------------------------------------------------------------------------------
But anyway, why is the query performance so bad...?
with only 200 query
--------------------------------------------------------------------------------
----------- 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.
--------------------------------------------------------------------------------
@Taine Woo
I understand why you need the timeout function. Thanks for the details!
--------------------------------------------------------------------------------
Mizuki ISHIKAWA wrote:
> @Taine 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.
--------------------------------------------------------------------------------

Admin Redmine さんが約2年前に更新

  • カテゴリIssues filter_56 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0