Salut Alain,

Its been good a while since I've worked with Inline::Java under a
CGI/mod_perl environment, but
here's what I can tell you :

On Thu, Oct 4, 2012 at 11:16 AM, Desilets, Alain <
alain.desil...@nrc-cnrc.gc.ca> wrote:

> Hi all,
>
> ...
>
> So my question is twofold:
>
>
> -          Is it possible to run Inline::Java under mod_perl, without
> using a shared JVM (i.e. without setting  PERL_INLINE_JAVA_SHARED_JVM=1)?
>

I /think/ the answer is yes, but it may be tricky. What platform are you
running all this on?

Basically if you don't use PERL_INLINE_JAVA_SHARED_JVM=1, each Perl
script/Apache child will try to start it's own JVM server. The problem is
that the communication with the JVM server is done on a TCP socket, and
each JVM server will try to allocate a new port number to listen on, if
your platform supports the "next available port number" feature. If it
doesn't (i.e. Windows), then all servers will start up on the same port
number (7890) and you will get errors.

What errors are you getting when you try it out?


> -          Even if it is "possible", what would be the downside of doing
> this? I would guess:
>
> o   Higher memory consumption (but the advantage is that if one process
> runs out of JVM memory, it won't affect the other processes)
>
> o   Overhead of starting the JVM happens N times, where N is the number of
> child processes that Apache allows (instead of 1 time if the JVM is shared)
>


I think that pretty much sums it up. You can also configure you Apache
children to die after a certain number of requests to make sure you never
reach your memory limit.

Patrick


> -
>
>
> Thanks.
>
>
>
> Alain Désilets
>
> Agent de recherche
> Technologies de l'information et des communications
> Conseil national de recherches Canada
> Tél. : 613-993-0610 | Téléc. : 613-952-0215
> alain.desil...@nrc-cnrc.gc.ca<mailto:alain.desil...@nrc-cnrc.gc.ca>
>
> Research Officer
> Information and Communication Technology
> National Research Council Canada
> Telephone: 613-993-0610 | Fax: 613-952-0215
> alain.desil...@nrc-cnrc.gc.ca<mailto:alain.desil...@nrc-cnrc.gc.ca>
>
>


-- 
=====================
Patrick LeBoutillier
Rosemère, Québec, Canada

Reply via email to