Error launching CGI app

Hello,

I have several webapps on an Ubuntu 12.04 server.
This morning, one of them crashed and i can’t relaunch it.

When i execute the shell command

 /usr/bin/perl -w /usr/lib/cgi-bin/myApp/myApp.cgi 

i got the message :
Use of uninitialized value $ENV{“REQUEST_METHOD”} in string eq at /usr/lib/cgi-bin/myApp/myApp.cgi line 110.
And then the process created by the command uses nearly 100% of the processor it runs on.
If i launch the app on my browser, it just loads eternally.

I tried several things :

  • Kill all the processes of the app, then relaunch the command
  • Restart the server, then relaunch the command
  • Delete and reupload the app
  • Upload a copy of the app named myApp2 and launch it

None of this works.

Does somebody have an idea ?

Regards.

[quote=442944:@laurent MIQUEL]Hello,

I have several webapps on an Ubuntu 12.04 server.
This morning, one of them crashed and i can’t relaunch it.

When i execute the shell command

 /usr/bin/perl -w /usr/lib/cgi-bin/myApp/myApp.cgi 

i got the message :
Use of uninitialized value $ENV{“REQUEST_METHOD”} in string eq at /usr/lib/cgi-bin/myApp/myApp.cgi line 110.
And then the process created by the command uses nearly 100% of the processor it runs on.
If i launch the app on my browser, it just loads eternally.

I tried several things :

  • Kill all the processes of the app, then relaunch the command
  • Restart the server, then relaunch the command
  • Delete and reupload the app
  • Upload a copy of the app named myApp2 and launch it

None of this works.

Does somebody have an idea ?

Regards.[/quote]
Right. You shouldn’t be executing that command directly. Your Web server needs to call it.

Do you get errors in your browser when you try to access it?

Usually, when i launch one of my app directly in the browser, without calling the shell command, (no app processus running), i got an internal server error.

As soon as i launch the shell command, it creates a processus and my app is available throught the browser.

Today, if i launch the shell command, the app loads eternally in the browser, without showing anything.

you Shouldn’t need to launch the binary manually. You should look at your web server logs to see why that’s failing.

If the web app launches and hangs… the could be any number of things. I’d first look at recent code changes to see if there’s an infinite loop somewhere.