Server becomes really slow after inactivity


  • | 636 points

    Hello,

    I'm having a really weird problem that I can't seem to understand/fix. This is confusing me because my main PC is the only device it occurs on, while I performed the exact same installation/configuration steps on my other devices. Anways here is the problem described:

    1. Start up server, load a web page, it takes about a full minute to load the first request.
    2. While using and regularly sending requests, server stays fast.
    3. After not using for a few minutes, the first next request takes about a full minute again.
    4. Repeat.

    I have no clue what could be causing this, my computer is not slow, it's way faster than my laptop, and my laptop doesn't have any issues with laragon speed. I'm also not running heavy on CPU or memory while using and while not using so it can't be that.

    It's starting to get really really frustrating, mostly because it's a problem I can't solve :)

    Any advice/help would be much appreciated!


  • administrators
    | 68677 points

    @elbojoloco: Your case is strange but we can try some ways to overcome.


  • | 636 points

    Neither helped the problem sadly.

    I also copied your my-large.ini settings to my own my.ini and that also didnt help.

    I do have some new information:
    Static files (like images) are loaded immediately, while everything that uses laravel's routing isn't.

    Though this does not tell me what might be causing the issue, maybe it's something for you to work with?


  • administrators
    | 68677 points

    @elbojoloco: It also doesn't tell me what might be causing the issue.
    However, from your information, I guess that some functions in your PHP code cause it and suggest you to use Xdebug to figure out.


  • | 636 points

    It almost can't be my code, it's fairly fresh, small database as well. Next to the fact it works perfectly fast on all other local devices and also on the server.

    I'll live with it for now, hopefully it'll be just me!


  • administrators
    | 68677 points

    Oh, I agree with you. For strange thing like that I don't think it is because of code or hardware.
    They might be related to OS, Antivirus, Firewall,...


  • | 636 points

    Yeah, my windows installation is already a few years old, so it's time for a clean install. Thanks for the time anyways!


  • | 62 points

    I was having the same problem and I fix it adding more Upstreams

    if you want to increase the number of PHP processes, put this line (without #) on usr/laragon.ini, under [nginx]

    [nginx]

    Upstream=5

    and the problem is gone
    maybe should try that


Log in to reply
 

Looks like your connection to Laragon was lost, please wait while we try to reconnect.