• GoDaddy Community
  • VPS & Dedicated Servers
  • VPS & Dedicated Servers

    cancel
    Showing results for 
    Show  only  | Search instead for 
    Did you mean: 
    New

    Intermittent issues executing Python scripts

    Hi,
    I have put together a site which makes Ajax GET calls in Javascript to Python scripts. These occur approximately every 1.2 seconds while the page is active and each out of every 50-100 calls fails. Looking in the Apache log, these problems seem to be reported as 404, like

     

    123.123.123.123 - - [24/Sep/2017:05:40:10 -0700] "GET /foo/bar.py?url=foo HTTP/1.1" 404 - "http://www.foo.net/bar" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Safari/604.1.38"

     

    The Javascript code retries after a delay on each fail and the call will eventually work but I would like to understand why this is happening and how I can try and prevent this. I have tried using Safari on macOS and Firefox on Windows and the problem occurs with both browsers. When the issue happens, I can't even access / for a short time but the site comes back up after a few tens of seconds. Despite the issues being listed as 404 in the Apache logs, Safari will report that the server unexpectedly dropped the connection, rather than displaying the usual 404 page, when trying to access /.

    I have checked the error log in the cPanel webpage and there are not any issues listed. There are no problems reported with resource usage so it seems that there is some kind of misconfiguration somewhere. What is strange is that many of the Python calls work OK and those that fail will work again after enough of a delay.

    Can anyone cast any light on what might be causing this problem and how it could be fixed..?