wqx081 / v8cgi

Automatically exported from code.google.com/p/v8cgi
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

crash on win32 #87

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hi!

I just run any of the script examples, even just response.write( 'test' );
Then I just hold F5 for a few seconds (sending many requests) and the "Apache 
HTTP Server has encountered a problem" error popups.

sometimes there is the error that I have attached in the text file from 
apache_error.log.
this appeared once as well: 

[Sat Feb 12 16:24:48 2011] [error] [client 127.0.0.1] require.paths is empty, 
have you forgotten to push some data there?
[Sat Feb 12 16:24:48 2011] [error] [client 127.0.0.1] require.paths is empty, 
have you forgotten to push some data there?
[Sat Feb 12 16:24:48 2011] [error] [client 127.0.0.1] ReferenceError: response 
is not defined (D:\\www\\v8-test\\core.js:1)\nReferenceError: response is not 
defined\n    at Object.<anonymous> (D:\\www\\v8-test\\core.js:1:43)

It is a bit random..

The log says Allocation failed - process out of memoryV8 but when I looked in 
memory usage it is stable.

It seems V8 is working again after few seconds after it crashed. Apache is 
still running and my PHP cgi is still working properly.

I am using v8cgi-0.9.0-win32
Chrome
Apache/2.2.11 (Win32) with PHP/5.3.0 
Windows XP SP3

I just installed it and everything is set to default.

In httpd.conf I have:

LoadModule v8cgi_module "C:/v8/mod_v8cgi.dll"
AddHandler v8cgi-script .js
v8cgi_Config "C:/v8/v8cgi.conf"

<VirtualHost 127.0.0.1:8888>
    ServerName localhost        
    DocumentRoot "D:/www/v8-test"
    AliasMatch .* "D:/www/v8-test/test.js"
</VirtualHost>

Original issue reported on code.google.com by mickael....@gmail.com on 12 Feb 2011 at 8:29

Attachments:

GoogleCodeExporter commented 8 years ago
Hi,

I would say that you have forgotten to set the "ThreadsPerChild 1" value in 
your Apache configuration file. v8cgi 0.9.0 is not threadsafe, so you need to 
reduce the number of apache threads to 1.

Alternative approaches:

1) try v8cgi on linux, using the mpm-prefork apache module. This one does not 
use threads (as opposed to your windows version), so there are no similar 
troubles regarding v8cgi.

2) checkout latest revision of v8cgi and compile it (or wait for the next 
release), because I have recently commited some fixes in order to make v8cgi 
more threadsafe.

3) use v8cgi in "cgi" mode, e.g. without the Apache module (approach #3 at 
http://code.google.com/p/v8cgi/wiki/ApacheConfiguration).

Please let me know is my guess about ThreadsPerChild was correct.

Original comment by ondrej.zara on 13 Feb 2011 at 8:31

GoogleCodeExporter commented 8 years ago
You guessed right :)
I will be using the windows version to develop only, so for sure I will get it 
for linux later!

thank you for your great work!

Original comment by mickael....@gmail.com on 13 Feb 2011 at 9:18

GoogleCodeExporter commented 8 years ago

Original comment by ondrej.zara on 29 Nov 2011 at 9:10