happyguy
2010-Mar-25 22:38 UTC
[Wine] Mysterious 15 second startup delay running Wine as www-data
I'm using Wine to run a text mode cgi-bin Win32 program on Ubuntu 9.10. If I run it under my regular account, or via sudo -H -u www-data ./mycgi.exe it runs instantly (< 1 sec.) When run as a cgi-bin program (therefore as www-data user), there is a (measured) 15 second delay and then the program runs in 350ms and the data is returned to the client. Any idea what might be causing this mysterious 15 second delay? I can't find anything unusual in the .wine folder (which is under /var/www) According to the package manager, I am running wine1.2 version 1.1.31-0ubuntu3. The output when run via sudo looks like: Code: No protocol specified No protocol specified No protocol specified Content-type: text/html <head></head><body>Incorrect method used to pass data.</body> I note there is no carriage return after </body> if that matters.
hellork
2010-Mar-28 09:40 UTC
[Wine] Re: Mysterious 15 second startup delay running Wine as www-data
Just a hunch, but if you have the source for this program you could try compiling it with mingw using the -mwindows switch to remove any DOS command windows. Of course if you could do that you might as well compile it as a native app and save the overhead of running it on wine.
happyguy
2010-Apr-04 21:19 UTC
[Wine] Re: Mysterious 15 second startup delay running Wine as www-data
Using sudo -H -u www-data env - wine ./mycgi.exe it takes 15 seconds to start! So something is wrong with the environment. Hmmm...
Martin Gregorie
2010-Apr-04 22:04 UTC
[Wine] Mysterious 15 second startup delay running Wine as www-data
On Sun, 2010-04-04 at 16:19 -0500, happyguy wrote:> Using > > sudo -H -u www-data env - wine ./mycgi.exe > > it takes 15 seconds to start! So something is wrong with the environment. Hmmm... >And if you stop and immediately restart it, does it still take 15 secs? Martin
happyguy
2010-Apr-04 23:04 UTC
[Wine] Re: Mysterious 15 second startup delay running Wine as www-data
It takes 15 seconds every time, even running it right after the previous run.
James McKenzie
2010-Apr-04 23:27 UTC
[Wine] Mysterious 15 second startup delay running Wine as www-data
happyguy wrote:> It takes 15 seconds every time, even running it right after the previous run. > >Networked printers??? James McKenzie
Quix0r
2010-Apr-05 00:03 UTC
[Wine] Re: Mysterious 15 second startup delay running Wine as www-data
@happyguy: What they are suggesting to you is that you might want to take a look in output of./configure --help what it is not needed for a CGI, big example is OpenGL (LOL?), Sound, scanner, printer, etc. So I mean all that stuff that is maybe needed on "desktop systems" but not on "server systems". So please execute... Code: ./configure --help ... and see what --disable-foo you might can add, just to make sure it is not compiled in to save some startup time. :)[/quote]
Quix0r
2010-Apr-05 00:03 UTC
[Wine] Re: Mysterious 15 second startup delay running Wine as www-data
Damn, quote block is broken. :(
vitamin
2010-Apr-05 05:23 UTC
[Wine] Re: Mysterious 15 second startup delay running Wine as www-data
happyguy wrote:> Using > > sudo -H -u www-data env - wine ./mycgi.exe > > it takes 15 seconds to start! So something is wrong with the environment. Hmmm...How about this? Code: env - wine ./mycgi.exe