ecmascript module

Igor Sysoev is at
Mon Jan 19 17:08:48 MSK 2009

On Mon, Jan 19, 2009 at 02:00:26PM +0000, Chris Farmiloe wrote:

> I've started to build an nginx module to process server-side  
> ecmascript (javascript) by embedding the spidermonkey engine. I've got  
> a (very) rough proof of concept hacked together just now, but after  
> about 30-50 requests the I can't allocate enough memory to build the  
> spidermonkey runtime.
> I'm new to C and just skim-read the white book to get this far so I  
> expect I am just making naive C mistakes.
> What I couldn't understand is that the same jsapi code outside of the  
> nginx module never seemed to have the allocation issues.
> And if it was a memory allocation issue... wouldn't my worker  
> processes rise above 2MB?
> Sorry for the vague message, but if someone could give me a nudge in  
> the right direction of what might be happening so I can get back to  
> learning it would be much appreciated!
> here's my example so far:

There is already an attempt to embedd SpiderMonkey:

(and some comments in Russian):

You may look this implementation.

Igor Sysoev

More information about the nginx mailing list