The prefork bridge must set up the root interpreter inherited from the apache 
root process. The worker bridge don't do it because its threads cannot use it 
anyway. In fact the sane function is called iirc from worker_prefork_common.c 
which is linked to both bridges. What if you use childiniscripts and have 
separate virtual interpreters?

-- Massimo
________________________________
Da: Georgios Petasis <petas...@yahoo.gr>
Inviato: martedì 23 gennaio 2018 18:55:45
A: Massimo MANGHI; rivet-dev@tcl.apache.org
Oggetto: Re: Rivet 3.0.0: too many connections from mysql...

Well, looking at the code, rivet_prefork_mpm.c contains a call to 
Rivet_InitCore. rivet_worker_mpm.c does not contain a call to Rivet_InitCore.

George

Στις 23/1/2018 19:45, ο Georgios Petasis έγραψε:
No, it is the only error I have in apache log. Hundreds of the same error...

George

Στις 23/1/2018 19:16, ο Massimo MANGHI έγραψε:

sorry, Rivet_InitCore is called from Rivet_PerInterpInit which in turn is 
called from any bridge. But the question is still do you have other errors when 
you start up the server?


 -- Massimo


________________________________
Da: Massimo MANGHI <massimo.man...@unipr.it><mailto:massimo.man...@unipr.it>
Inviato: martedì 23 gennaio 2018 18:13
A: rivet-dev@tcl.apache.org<mailto:rivet-dev@tcl.apache.org>; 
petas...@yahoo.gr<mailto:petas...@yahoo.gr>
Oggetto: Re: Rivet 3.0.0: too many connections from mysql...


no, the error is quite different ( command ::rivet::apache_log_error not found) 
and it's generated from within the worker bridge (without a working bridge no 
Tcl stuff can be evaluated). Do you have more errors *before" this one? The 
call to Rivet_InitCore should set up the whole command set and it's compiled 
into mod_rivet.so


 -- Massimo




________________________________
Da: Georgios Petasis <petas...@yahoo.gr><mailto:petas...@yahoo.gr>
Inviato: martedì 23 gennaio 2018 17:53
A: Massimo MANGHI; rivet-dev@tcl.apache.org<mailto:rivet-dev@tcl.apache.org>
Oggetto: Re: Rivet 3.0.0: too many connections from mysql...

Στις 23/1/2018 18:32, ο Massimo Manghi έγραψε:
>
>
> On 01/23/2018 04:27 PM, Georgios Petasis wrote:
>> Ok, I have changed MPM back to prefork, and I have changed my apache
>> configuration to:
>>
>> <IfModule mpm_prefork_module>
>> LoadModule rivet_module modules/mod_rivet.so
>> RivetServerConf MpmBridge prefork
>> </IfModule>
>> <IfModule mpm_worker_module>
>> LoadModule rivet_module modules/mod_rivet.so
>> RivetServerConf MpmBridge worker
>> </IfModule>
>> <IfModule mpm_event_module>
>> Error "mod_rivet does not support the event mpm."
>> </IfModule>
>>
>> And I think I am back to normal. And next time the OS changes the
>> MPM, I will get at least an error while loading apache...
>>
>> Best regards,
>> George
>>
>
>
> sorry, I forgot that you have established that tdbc and threads don't
> get very well together, so you can't safely test your application with
> the worker MPM neither, can you?
>
> In a previous message you said that what you observe is a frequent
> call to the global_init_script (called by Rivet_VirtualHostsInterps).
> This script is evaluated only when threads are started. This happens
> only during the child initialization phase. With the prefork bridge
> the ChildInit callback itself calls Rivet_VirtualHostsInterps. The
> worker bridge calls it from each worker thread, only once in the
> thread lifetime. So I think it's strange, if crashes don't occur, that
> this code in called so frequently. Do you have clues in the error log?
>
> Unfortunately the documentation is shy of providing implementation
> details of the event bridge, but it's stated that as a MPM is based on
> the worker MPM having as main difference the way connections are handled.
>
>  -- Massimo
>
>
I have tried to enable rivet under worker mpm, but I am getting an error:

[:error] [pid 5963:tid 140477525366528] (20014)Internal error (specific
information not available): mod_rivet: Error running GlobalInitScript
'set ::PaloServices 0; source -encoding utf-8
/var/www/rivet/server/server_init.tcl': invalid command name
"::rivet::apache_log_error"

     while executing\n"::rivet::apache_log_error warning "Server Init
loaded under PID [pid]""

     (file "/var/www/rivet/server/server_init.tcl" line 34)\n invoked
from within\n"source -encoding utf-8 /var/www/rivet/server/server_init.tcl"

So, something is wrong. Rivet did not find its worker mpm library? It is
in the same directory as worker:

root@fedser petasis]# ls /usr/lib64/rivet3.0/site-packages/mod_rivet/mpm/
rivet_lazy_mpm.so  rivet_prefork_mpm.so  rivet_worker_mpm.so

George



Reply via email to