We recently updated our server to a much more beefy setup, since we are expecting much higher user numbers. We are running a Laravel 7.28.4 application on the server and the user interacts with it by visiting about 10 web-pages in sequence, where he provides data in 3 of those and posts them to the server, which puts them into the database. The server will then send an email that everything is finished.
Now we did a stresstest with Apache JMeter with almost 130.000 Accesses per hour, where we reproduced exactly this 10 step sequence for every thread. The requests were done in immidiate succession and the server was easily able to handle it. We used about 250 threads here.
HOWEVER if we do a stresstest with only 60000 Accesses per hour with more threads with a waiting-time in between every request, the server gets completely overworked and slow. Many of the requests get an error 503 or 522. Here we used about 500 threads.
While doing theses stresstests the server was on constant 5-6% RAM usage and about 10-12% CPU usage. I don't think the Database/Mailserver/Hardware are bottlenecking if everything worked fine with more requests.
However, I'm guessing Laravel has trouble managing many sessions at once? I have already tried to swap the session driver to database instead of file storage. The result was not better.
Does anybody know what I can do to improve the response time of the server? Or might there be other ideas on why it is struggling with more threads?
Thanks
question from:
https://stackoverflow.com/questions/65861045/laravel-7-28-4-application-has-problems-with-too-many-jmeter-threads-at-once 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…