• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion
  • Please beaware of a breaking change in the REST API on the next Plesk release (18.0.62).
    Starting from Plesk Obsidian 18.0.62, requests to REST API containing the Content-Type header with a media-type directive other than “application/json” will result in the HTTP “415 Unsupported Media Type” client error response code. Read more here

Concurent processes

Peter-

Basic Pleskian
Hey guys,

I have a slight problem :)

I need to run a couple of concurent processes in the background, 10 at the moment. They're php scripts, I'm calling them with wget ("self request so to speak") and they need to run continually (check for new stuff to process, sleep 3 seconds, repeat).

Ok ...

Now, the problem is when I'm trying to navigate to my website, the pages take a lot to load. I'm assuming I've hit my MaxClients setting but "grep Max /etc/httpd/conf/httpd.conf" outputs:

# ServerLimit: maximum value for MaxClients for the lifetime of the server

# MaxClients: maximum number of server processes allowed to start

MaxClients 256

# MaxClients: maximum number of simultaneous client connections

MaxClients 300


This should be fine. I am running plesk 12 on a centos 6.6. Should I look somewhere else for "site specific" maximums?

CPU and memory are fine btw.

Thanks
 
Hi Peter,

Why NOT just create a cron-job and run the script using the CLI php ...
E.g
Code:
php /var/www/vhosts/domain.com/httpdocs/script.php

WGET puts the load on your web server which in return would affect your response times ...
 
Hey :)

I'm using laravel 5.0 and not sure exactly how to load the exact methods from command line. It's way easier from http. Plus, I don't need to install mongo.so for command line either.

Can you help with the max clients thing? :D

Thanks!
 
I tried increasing ServerLimit and MaxClients server wide from 256 to 512 but that doesn't fix it.
Also, "netstat | grep http | wc -l" outputs "35" at the moment.

Isn't there anything I can do to increase the # of connections to the server? It's really "idle" and makes no sense to block me now.
 
Hi.

Was mod_php, now it's fcgid, had MaxProcessesClass (can't remember the exact name) = 8, changed to 20 and it's fine. My site was limited to only 8 concurent processes and since I only have 2 websites in there and it's a dedicaed machine, I don't need a setting that low.

Thanks! :)
 
Glad you found it. The defaults on some of this stuff are so ridiculous for modern servers. I wish Plesk released some guidelines to help us manage base server settings like this on machines that are obviously being used for web hosting.

Cheers,
- Paul
 
Yeah, the docs are pretty poor unfortunately. And I have a feeling the limitations are so restrictive because most of these servers are being used as shared boxes, not dedicated machines, which usually have admins. I'm in the middle lol. Enough knowledge to want a dedicated machine but not enough to run it smoothly :)
 
Back
Top