I’m using Xdebug to develop a WordPress plugin, and I’m encountering an issue while trying to debug POST requests. When I send a POST request with some data I want to inspect what’s being sent in the $_POST superglobal variable.
However, the problem I’m running into is that I keep getting a timeout error, usually after about a minute or so. To troubleshoot, I went into the folder for the site on Local, and I found an Apache, PHP, and MySQL folder. I searched through every file for a timeout keyword and updated any values I found to 600 (e.g., in PHP where it was set to 60, I increased it to 600). Unfortunately, this hasn’t resolved the issue. The timeout still happens, and I’m unable to properly use Xdebug for debugging.
Has anyone encountered a similar issue or have any suggestions for resolving this? Are there other settings or configurations I might be missing to prevent these timeouts and allow me to debug POST requests with Xdebug effectively?
I noticed it happens with every breakpoint in php file. So not only when I do a Post Request. After around 40 to 50 seconds screen of browser gets white and shows error or just stays completely white. Then also xdebug stops
max_execution_time is even 1200
Local Version 9.0.5+6706
PHP Debug v1.35.0 Extension for VSCode
VSCode 1.94.2
Windows 10 Pro 22H2
PHP 7.4.30
Wordpress 6.6.2
Database MariaDB 10.4.10
I found this in site-error.log:
[Thu Oct 17 20:24:23.975859 2024] [fcgid:warn] [pid 17864:tid 1344] [client 127.0.0.1:49737] mod_fcgid: read timeout from pipe
[Thu Oct 17 20:24:23.976423 2024] [fcgid:warn] [pid 17864:tid 1344] (138)timed out: [client 127.0.0.1:49737] mod_fcgid: ap_pass_brigade failed in handle_request_ipc function
when I showed the site error-log to chatgpt it said I should add this section to apache2.conf.hbs.
<IfModule mod_fcgid.c>
FcgidMaxRequestLen 30000000
FcgidIOTimeout 1200 # Set to 10 minutes or more
FcgidConnectTimeout 1200 # Set to 2 minutes
</IfModule>
I added it and restarted local but then the whole site doesnt run anymore. just got 502 error.
BTW there should already be a <IfModule fcgid_module> directive somewhere in conf\apache\site.conf.hbs so you can add the timeout there. FcgidMaxRequestLen is already set in module.conf.hbs, and FcgidConnectTimeout is for the initial connection so you don’t need that either.
Also, this is the correct solution to your original problem as FcgidIOTimeout defaults to 40 seconds. Personally I have it set to 600 in my Local projects.