Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
01-23-2014, 01:02 AM
|
#1
|
Member
Registered: Aug 2013
Distribution: CentOS 6.5
Posts: 64
Rep: 
|
Plesk throttling web traffic - Centos 6.4 - Plesk 11.5
Hey,
I'm running a custom application on a server with plesk 11.5. The client complains that the website stops loading while adding content to the system, this does not happen everyday though. The application is a news publishing system so data entry is pretty intensive. The problem is that this doesn't seem to effect everyone, examining external uptime reports does not show any evidence of the problem either.
This leads me to suspect that plesk is throttling connections to the IP from which our client is logging on, any idea how I can fix this problem?
|
|
|
01-24-2014, 11:29 AM
|
#2
|
Senior Member
Registered: Sep 2009
Location: Raleigh, NC
Distribution: Ubuntu, PopOS, Raspbian
Posts: 1,899
|
Is the client doing anything additional when they're working? I've had clients complain about poor performance on web applications but they were streaming youtube and music while working. The streaming significantly slowed their load times so really the "slow application" was just them working while doing network intensive stuff and not the application at all.
|
|
|
01-24-2014, 11:34 AM
|
#3
|
Member
Registered: Aug 2013
Distribution: CentOS 6.5
Posts: 64
Original Poster
Rep: 
|
I've inspected the log files and this is what I see, hundreds of such lines
Code:
mod_fcgid: can't apply process slot for /var/www/cgi-bin/cgi_wrapper/cgi_wrapper
Connection reset by peer: mod_fcgid: error reading data from FastCGI server
Premature end of script headers: index.php
Below is my fcgid.conf
Code:
LoadModule fcgid_module modules/mod_fcgid.so
<IfModule mod_fcgid.c>
<IfModule !mod_fastcgi.c>
AddHandler fcgid-script fcg fcgi fpl
</IfModule>
FcgidIPCDir /var/run/mod_fcgid/sock
FcgidProcessTableFile /var/run/mod_fcgid/fcgid_shm
FcgidInitialEnv RAILS_ENV production
FcgidIdleTimeout 3600
FcgidIdleScanInterval 480
FcgidBusyTimeout 1800
FcgidBusyScanInterval 480
FcgidZombieScanInterval 12
FcgidErrorScanInterval 12
FcgidProcessLifeTime 0
# Change the rate at which new FastCGI processes are spawned under load. Higher=faster
FcgidSpawnScoreUpLimit 10
# Higher number = spawning more FastCGI processes decreases the spawn rate (controls runaway
FcgidSpawnScore 1
# Higher number = terminating FastCGI processes decreases the spawn rate (controls runaway)
FcgidTerminationScore 2
# Increase the FastCGI max request length for large file uploads (needed for some sites)
FcgidMaxRequestLen 1073741824
FcgidMaxRequestsPerProcess 100000
#FcgidMinProcessesPerClass 3
FcgidMaxProcessesPerClass 4
FcgidMaxProcesses 16
FcgidIOTimeout 1800
And my server specs
Code:
Processor: AMD Opteron 3280 Octacore
RAM: 24GB
HDD: 2x2TB Sata
OS: CentOS 6.4 64-bit
Plesk Vr: 11.5
Any idea how I could tune fcgid to avoid such errors? Well, given that fcgid is the one being exhausted.
Edit: I'm running Apache + PHP-FastCGI
Last edited by imadsani; 01-24-2014 at 11:35 AM.
|
|
|
01-24-2014, 11:41 AM
|
#4
|
Senior Member
Registered: Sep 2009
Location: Raleigh, NC
Distribution: Ubuntu, PopOS, Raspbian
Posts: 1,899
|
Quote:
Originally Posted by imadsani
I've inspected the log files and this is what I see, hundreds of such lines
Code:
mod_fcgid: can't apply process slot for /var/www/cgi-bin/cgi_wrapper/cgi_wrapper
Connection reset by peer: mod_fcgid: error reading data from FastCGI server
Premature end of script headers: index.php
*snip*
Any idea how I could tune fcgid to avoid such errors? Well, given that fcgid is the one being exhausted.
|
Some light google on your error message gives some results about how to tune the values. e.g.
http://stackoverflow.com/questions/1...y-process-slot
|
|
|
01-24-2014, 11:51 AM
|
#5
|
Member
Registered: Aug 2013
Distribution: CentOS 6.5
Posts: 64
Original Poster
Rep: 
|
yeah, i looked at that this afternoon. But the thing is, the average load on the server never goes above an average of 4(8 cores) and cpu load averages at 30% throughout the day. The solution say's that either of these two will hit 100% and to then tune a couple of variables, but here i don't see anything touching 100% utilization.
Edit: This stuff is new to me, if i'm understanding this right, I need to increase FcgidMaxProcesses to above the current set value of 16? If so then how much should i it increment by?
Last edited by imadsani; 01-24-2014 at 11:54 AM.
|
|
|
01-24-2014, 11:53 AM
|
#6
|
Senior Member
Registered: Sep 2009
Location: Raleigh, NC
Distribution: Ubuntu, PopOS, Raspbian
Posts: 1,899
|
Quote:
Originally Posted by imadsani
yeah, i looked at that this afternoon. But the thing is, the average load on the server never goes above an average of 4(8 cores) and cpu load averages at 30% throughout the day. The solution say's that either of these two will hit 100% and to then tune a couple of variables, but here i don't see anything touching 100% utilization.
|
Based on what I've read it sounds like you're not CPU bound so you can increase the max number of workers. Since your max daily processing doesn't surpass 30% then I recommend tripling your current max value and see what happens.
Code:
FcgidMaxProcesses 48
Be mindful of machine memory when you're doing this. If you have a low amount of memory then you might be bound by memory for the number of allowed workers. Swapping memory will cause large performance issues. You can use apache benchmark to benchmark how many requests your server can handle (part of apache2-utils package).
Last edited by sag47; 01-24-2014 at 11:58 AM.
|
|
1 members found this post helpful.
|
01-24-2014, 11:56 AM
|
#7
|
Member
Registered: Aug 2013
Distribution: CentOS 6.5
Posts: 64
Original Poster
Rep: 
|
^ thank's a lot, will try it out.
|
|
|
01-29-2014, 10:58 AM
|
#9
|
Senior Member
Registered: Sep 2009
Location: Raleigh, NC
Distribution: Ubuntu, PopOS, Raspbian
Posts: 1,899
|
What are the specs of your host?
How much RAM, how many processing cores, how many threads in each core?
|
|
|
01-29-2014, 02:35 PM
|
#10
|
Member
Registered: Aug 2013
Distribution: CentOS 6.5
Posts: 64
Original Poster
Rep: 
|
This is a screen of htop
http://i1196.photobucket.com/albums/...ps03b3865e.png
load time seems to be back to normal, google analytics reports around a 100 people on the site right now.
Last edited by imadsani; 01-29-2014 at 02:36 PM.
|
|
|
All times are GMT -5. The time now is 11:55 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|