Apache Lounge


About Forum Index Downloads Search Register Log in RSS Twitter

Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.



A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Speed up Perl scripts

Joined: 12 Aug 2022
Posts: 1
Location: Ukiah, CA, USA

PostPosted: Thu 13 Oct '22 5:50    Post subject: Speed up Perl scripts Reply with quote


I'm just getting into FastCGI to accelerate my Perl scripts and it has been working great so far with one big caveat: on pages where multiple AJAX requests may occur, the second request is orders of magnitude slower than the initial one (say 1.5 seconds versus 230 ms), regardless of which specific request is done second. After going through the code and watching where the delay occurs, I believe this is since they happen in an asynchronous fashion and Apache doesn't think the script has hit the appropriate "score" to have multiple child processes spawned.

Looking at the Apache directives for FastCGI, I suspect I need to set the spawn score lower, but I assume that might risk an excessive amount of spawning. Is there a way to set a default of, say, two (or some other wise number) FastCGI processes for the script (to help with parallel requests), but keep the overall score the same so that it doesn't needlessly spawn a bunch of additional child processes?

I have not modified FcgidMinProcessesPerClass from the default and the Apache documentation mentions the default is 3, which would make me think it should be willingly launching an additional process up to 3, but perhaps I'm misunderstanding what this directive does?

Do you have suggestions on how I might adjust these mod_fcgid settings to make it better address my issue?

Thanks so much!
Back to top
James Blond

Joined: 19 Jan 2006
Posts: 7147
Location: Germany, Next to Hamburg

PostPosted: Thu 13 Oct '22 8:46    Post subject: Reply with quote

Please post your current settings.

Do you use mod_fcgid or mod_fastcgi?
Back to top

Reply to topic   Topic: Speed up Perl scripts View previous topic :: View next topic
Post new topic   Forum Index -> Apache