Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Long request blocks other requests in Apache and PHP

Tags:

php

apache

I have a request that takes about 1.5 minutes to complete, but when it does the request, it blocks all the other requests by the server. I'm using Apache with mod_php. What's the best way to fix this? Thanks!

like image 456
Filo Stacks Avatar asked Jun 19 '11 23:06

Filo Stacks


1 Answers

[mod_telepathy]

Do you use sessions? If so - while you haven't closed session in long script, others will wait for it.

If you don't need session there all the time - you can close it with session_write_close()

[/mod_telepathy]

like image 177
zerkms Avatar answered Sep 28 '22 03:09

zerkms