XDEBUG session timeout with “Service Unavailable” message

Some Background

My application runs on a CentOS machine with Apache 2.4 and PHP 5.6 (from Remi’s repo), and I’m using PHP-FPM (via Apache proxy option) to handle the php files (not the Apache module). And I was trying to debug a remote PHP application (using xdebug) running on a VM.

I setup my IDE for remote debugging, and start setting some break points and going though the code, and right after 60 seconds (while I’m still running though the code and stepping over some lines) the browser will stop and  display the message “Service Unavailable”.

I started with this xdebug setup,

I’m basically will start the xdebug service on my machine on port 9000, and I’m telling xdebug on the remote machine to connect back to the address the initiate the debug session (in this case the remote_host option will be ignored).

At first I though it was php/xdebug miss behaving, to I tried to play with the cookie_expire_time but the didn’t solved my problem, so I moved to look if it was PHP or the connection between Apache and the PHP layer, and this is what solved my problem.




Related Post

Leave a Reply

Your email address will not be published. Required fields are marked *