• Dear Pleskians! The Plesk Forum will be undergoing scheduled maintenance on Monday, 7th of July, at 9:00 AM UTC. The expected maintenance window is 2 hours.
    Thank you in advance for your patience and understanding on the matter.

Resolved Disable output buffering

Patashoow

Basic Pleskian
Server operating system version
Ubuntu 20.04
Plesk version and microupdate number
18.0.68
Hello,

I'm really struggling trying to find how to disable output buffering on my server.

I'm using Apache 2.4.41 with Nginx in proxy mode. I also have ModSecurity enabled with Comodo rules (free) and use PHP-FPM served by Apache.
I have set, in my "php.ini" file, the value of "output_buffering" to "8192" but as it's PHP related configuration, whenever I want to flush data, I can simply do it using PHP code.
But in my case, the requests always wait to complete before sending the whole result at once even when the code asks to flush the buffer.

So how is the output buffering controlled on Plesk? Is it possible to completely turn it off or even better, disabling it for a specific script?
 
The flushpackets option should help here, i.e. you can place the following option somewhere in the Apache2 configuration.

Code:
# disable output buffering for php-fpm/proxy_fcgi
<IfModule proxy_fcgi_module>
  <Proxy fcgi://127.0.0.1:9000 enablereuse=off flushpackets=on>
  </Proxy>
</IfModule>
 
Oh! My! Gawd! I've been trying for like 8 hours straight! You saved me so much time.
Thanks a lot! That indeed worked.

So from there, can I only apply it for a specific script and not the whole server?
 
For only one vHost, you should be able to put that config snippet into the "Additional Apache directives" option on the "Apache & nginx Settings" page in Plesk.

For only a specific script...well, never done that, no clue if something with <FilesMatch> or <Location> around that config snippet may work.
 
  • Like
Reactions: mow
I was about to answer myself.
It is indeed by using <FilesMatch>.
So thank you again! (so much!) I owe you a drink ;)

EDIT: I still don't know how to mark the question as solved.
 
Back
Top