0

I am hosting, on Windows Server 2022, a web application that makes regular ajax calls to a PHP backend.

The calls themselves are quite light, just pulling and pushing data from and to a MySQL db.

Over 1,000 users could be logged in concurrently (up to 10,000 in the near future). It doesn't seem to be an issue, until 100+ or so users log in concurrently, or near-concurrently.

I then get the server clogged with tens of stuck PHP-CGI processes.

Can anyone share advice on an adequate FastCGI config for this scenario? I am - to say the least - confused by

Maxrequests vs Maxinstances Activity timeout vs Idle timeout Queue length Rapid fails per minute vs Request timeout Using tcp vs using Namedpipe

Thanks

6
  • Login counts are not of interest. Queries per second is. "nginx" is touted as fast; I have not tested it. You need to discover the max number of we clients and connections to MySQL. The latter is SHOW GLOBAL STATUS LIKE 'Max_used_connections' and also 'Threads_running'. Do you have SSD? Commented Nov 17, 2022 at 0:34
  • Learn how to analyze why PHP web apps clogged with a profiler and then you can resolve stuck PHP-CGI processes and get what you wanted. Otherwise, you just get more of them. Commented Nov 17, 2022 at 1:28
  • @RickJames it's a VPS, and yes I believe it's running on SSD. I remember in the past, analysis of that same application led to set max_connections to 600. However, SQL didn't seem to be the bottleneck. I was able to fire queries on workbench and get results instantly - while the clogging went on. It looks to me that PHP was somehow the culprit Commented Nov 17, 2022 at 4:02
  • @LexLi can you suggest a profiler that will work with IIS? All I have found seems to require either Nginx or Apache Commented Nov 17, 2022 at 4:06
  • @resle - PHP is limited to, or allowed to, a number of processes as specified by the web server. Otherwise, my experience says that PHP is not the villain. Sure, 600 MySQL connections is no problem -- but only if most are sitting idle. When Threads_running exceeds 20, you have a problem. Commented Nov 17, 2022 at 15:54

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.