Homec4science

Add an option to make it easier to debug page hangs

Authored by epriestley <git@epriestley.com> on Sep 11 2014, 15:28.

Description

Add an option to make it easier to debug page hangs

Summary:
Fixes T6044. We've had two cases (both the same install, coincidentally) where pages got hung doing too much data fetching.

When pages hang, we don't get a useful stack trace out of them, since nginx, php-fpm, or PHP eventually terminates things in a non-useful way without any diagnostic information.

The second time (the recent Macros issue) I was able to walk the install through removing limits on nginx, php-fpm, php, and eventually getting a profile by letting the page run for several minutes until the request completed. However, this install is exceptionally technically proficient and this was still a big pain for everyone, and this approach would not have worked if the page actually looped rather than just taking a long time.

Provide debug.time-limit, which should give us a better tool for reacting to this situation: by setting it to a small value (like 10), we'll kill the page after 10 seconds with a trace, before nginx/php-fpm/php/etc can kill it uselessly. Hopefully that will be enough information to find the issue (generally, getting a trace has been 95% of the problem in the two cases we've encountered).

Test Plan: Set this option to 3 and added a sleep loop, saw a termination after 3 seconds with a useful trace.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: csilvers, joshuaspence, epriestley

Maniphest Tasks: T6044

Differential Revision: https://secure.phabricator.com/D10465

Details

Committed
epriestley <git@epriestley.com>Sep 11 2014, 15:28
Pushed
aubortJan 31 2017, 17:16
Parents
rPHd3cd9115f949: Add `ui.footer-items` to add a custom page footer
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHcae59d83456e: Add an option to make it easier to debug page hangs (authored by epriestley <git@epriestley.com>).Sep 11 2014, 15:28