marknher has asked for the wisdom of the Perl Monks concerning the following question:

Hi Monks!

I have a perl sript ticketing system that is admittedly old but works perfect for our company. Recently, we started getting ERROR 503 messages on our website and it goes away in about 30 minutes. I reached out to the server admins and they responded with the following

While revising this case our administrators have noticed you script is using socket connections which not completely closed and error similar to arises:

AH02833: ScriptSock /var/run/cgid.sock.23916 does not exist:

since the script attempts to reference to previous non existing socket previously used and the error noticed arises. We can not offer debugging of the scripts although and you should check with your website developers what socket connections are used, how are these closed and why the processes reference to an old connection so they could avoid that for your script.

I've Googled around about this and went through my scripts trying to figure out anything that has changed but I come up blank. Anyone have any clues on what this really means so that I can hunt down the problem and fix it?

Thanks, Mark T.

Replies are listed 'Best First'.
Re: Scriptsock does not exist??
by jcb (Parson) on Aug 05, 2020 at 01:48 UTC

    Your problem appears to be related to FastCGI or some similar system, maybe — there is not enough information in your post to say anything with certainty. The mention of a "cgid" seems to point in this direction. Is this running on Apache or some other httpd? Did the problems start after the httpd was updated on the server?

      cgid sounds like a multithreaded Apache running CGIs on Unix: https://httpd.apache.org/docs/2.4/mod/mod_cgid.html

      If the error happens exactly every 30 min, it may be some strange kind of rate limiting. Anyway, it looks like an Apache configuration problem.

      Alexander

      --
      Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
      Mod_cgid doesnt fastcgi.
Re: Scriptsock does not exist??
by marknher (Initiate) on Aug 06, 2020 at 21:31 UTC
    Sorry for the lack of information. The script runs on a shared hosting account. I know they update things but don't necessarily know when. It doesn't occur every 30 minutes but when it does happen to occur, the 503 error usually goes away in about 30 minutes. The script is a ticketing/CRM system we use for our small business that was created a long time ago and has no support etc. Thanks for the tips so far. I'm going to read up on fastcgi and Mod_cgid. My understanding is a socket is just a connection from the server to something else. I know just enough to be dangerous :) I've used this script for years and have learned Perl to make changes over the years by reverse engineering the original code. It's work great for me thus far. It's just this error came out of left field. Not something that started occurring after I modified code. When this happens our business is dead in the water. But it only happens maybe 2 twice a week and just something I'm afraid is going to get worse or happen at the worst time.

      This is not a problem with anything you have done or your code. It is a problem with the hosting provided to you. The socket is used by mod_cgid and without it your scripts won't run, hence the 503s. I suspect that your hosting providers are inadvertently deleting the socket file from /var/run periodically and a subsequent (again, presumably scheduled) restart of apache eventually reinstates it.

      The response you posted from your provider is worrying in that they seem not to know that this socket is integral to apache, that the error message is an apache one and that neither of these things are anything to do specifically with your scripts. Perhaps it's time to move to a more clued-up hosting provider?

      When this happens our business is dead in the water.

      In that case it's definitely time to move to a more clued-up hosting provider. Good luck.


      🦛