You are viewing a plain text version of this content. The canonical link for it is here.
Posted to rivet-dev@tcl.apache.org by Alexey Noskov <a...@n-kov.com> on 2017/09/11 09:56:42 UTC

rivet-2.3.3 - problem with ChildInitScript - caught SIGTERM, shutting down

Dear all,

I develop a web service https://gsdr.gq.

SQLite/Spatialite is used as database. Because of multiple massive 
requests from time to time.

SQL requests are interrupted with "malformed database schema". As I 
understand, Sqlite

by default uses serialized mode for multi threading support.

(More information about threading in SQLite can be found here 
https://sqlite.org/threadsafe.html )

Probably, this is the reason

of the "malformed" (about every 20-40th SQL request is interrupted with 
this error). I would

like to try to switch SQLite to multi-thread mode and use:

/RivetServerConf SeparateVirtualInterps yes//
//RivetServerConf SeparateChannels yes/

This allows to use independent database connections for each child and 
will hopefully resolve as error.

Currently I use /RivetServerConf ServerInitScript "source 
/home/local/rivetfiles/initscript.tcl"/.

When I use the following configuration:

/RivetServerConf ChildInitScript "source 
/home/local/rivetfiles/initscript.tcl"//
//RivetServerConf SeparateVirtualInterps yes//
//RivetServerConf SeparateChannels yes/

Apache rises this error:

[mpm_prefork:notice] [pid 18218] AH00169: caught SIGTERM, shutting down
[mpm_prefork:notice] [pid 18388] AH00163: Apache/2.4.10 (Debian) 
OpenSSL/1.0.1t Rivet configured -- resuming normal operations
[core:notice] [pid 18388] AH00094: Command line: '/usr/sbin/apache2'

In this case, server is not down, but if try request it return the 
following error log:

[core:error] [pid 18396] [client 129.206.65.76:46446] AH00082: an 
unknown filter was not added: includes
[:error] [pid 18396] (20014)Internal error: mod_rivet: Error in 
Rivet_ParseExecFile exec file '/var/www/html/index.rvt': can not find 
channel named "stdout"\n    while executing\n"puts "<b>Rivet ErrorScript 
failed</b><br />""
[core:error] [pid 18392] [client 129.206.65.76:46447] AH00082: an 
unknown filter was not added: includes
[:error] [pid 18392] (20014)Internal error: mod_rivet: Error in 
Rivet_ParseExecFile exec file '/var/www/html/index.rvt': can not find 
channel named "stdout"\n    while executing\n"puts "<b>Rivet ErrorScript 
failed</b><br />""
[core:error] [pid 18394] [client 129.206.65.76:46448] AH00082: an 
unknown filter was not added: includes
[:error] [pid 18394] (20014)Internal error: mod_rivet: Error in 
Rivet_ParseExecFile exec file '/var/www/html/index.rvt': can not find 
channel named "stdout"\n    while executing\n"puts "<b>Rivet ErrorScript 
failed</b><br />""
[core:error] [pid 18398] [client 129.206.65.76:46449] AH00082: an 
unknown filter was not added: includes
[:error] [pid 18398] (20014)Internal error: mod_rivet: Error in 
Rivet_ParseExecFile exec file '/var/www/html/index.rvt': can not find 
channel named "stdout"\n    while executing\n"puts "<b>Rivet ErrorScript 
failed</b><br />""
[core:error] [pid 18400] [client 129.206.65.76:46450] AH00082: an 
unknown filter was not added: includes
[:error] [pid 18400] (20014)Internal error: mod_rivet: Error in 
Rivet_ParseExecFile exec file '/var/www/html/index.rvt': can not find 
channel named "stdout"\n    while executing\n"puts "<b>Rivet ErrorScript 
failed</b><br />""
[core:error] [pid 18417] [client 129.206.65.76:46451] AH00082: an 
unknown filter was not added: includes
[:error] [pid 18417] (20014)Internal error: mod_rivet: Error in 
Rivet_ParseExecFile exec file '/var/www/html/index.rvt': can not find 
channel named "stdout"\n    while executing\n"puts "<b>Rivet ErrorScript 
failed</b><br />""
[core:notice] [pid 18388] AH00052: child pid 18392 exit signal 
Segmentation fault (11)
[core:notice] [pid 18388] AH00052: child pid 18394 exit signal 
Segmentation fault (11)
[core:notice] [pid 18388] AH00052: child pid 18396 exit signal 
Segmentation fault (11)
[core:notice] [pid 18388] AH00052: child pid 18398 exit signal 
Segmentation fault (11)
[core:notice] [pid 18388] AH00052: child pid 18400 exit signal 
Segmentation fault (11)
[core:notice] [pid 18388] AH00052: child pid 18417 exit signal 
Segmentation fault (11)
[core:error] [pid 18419] [client 129.206.65.76:46452] AH00082: an 
unknown filter was not added: includes
[:error] [pid 18419] (20014)Internal error: mod_rivet: Error in 
Rivet_ParseExecFile exec file '/var/www/html/index.rvt': can not find 
channel named "stdout"\n    while executing\n"puts "<b>Rivet ErrorScript 
failed</b><br />""
[core:error] [pid 18421] [client 129.206.65.76:46453] AH00082: an 
unknown filter was not added: includes
[:error] [pid 18421] (20014)Internal error: mod_rivet: Error in 
Rivet_ParseExecFile exec file '/var/www/html/index.rvt': can not find 
channel named "stdout"\n    while executing\n"puts "<b>Rivet ErrorScript 
failed</b><br />""
[core:notice] [pid 18388] AH00052: child pid 18419 exit signal 
Segmentation fault (11)
[core:notice] [pid 18388] AH00052: child pid 18421 exit signal 
Segmentation fault (11)
[core:error] [pid 18427] [client 129.206.65.76:46454] AH00082: an 
unknown filter was not added: includes
[:error] [pid 18427] (20014)Internal error: mod_rivet: Error in 
Rivet_ParseExecFile exec file '/var/www/html/index.rvt': can not find 
channel named "stdout"\n    while executing\n"puts "<b>Rivet ErrorScript 
failed</b><br />""
[core:error] [pid 18425] [client 129.206.65.76:46455] AH00082: an 
unknown filter was not added: includes
[:error] [pid 18425] (20014)Internal error: mod_rivet: Error in 
Rivet_ParseExecFile exec file '/var/www/html/index.rvt': can not find 
channel named "stdout"\n    while executing\n"puts "<b>Rivet ErrorScript 
failed</b><br />""
[core:notice] [pid 18388] AH00052: child pid 18425 exit signal 
Segmentation fault (11)
[core:notice] [pid 18388] AH00052: child pid 18427 exit signal 
Segmentation fault (11)

I use Debian Jessie  ARM architecture ( aarch64). rivet-2.3.3 built from 
source. Apache 2.4.10 and SQLite 3.8.7.1 from repository.

I tried different configurations and detected that SEGTERM appeared 
because of /RivetServerConf ChildInitScript "source 
/home/local/rivetfiles/initscript.tcl"//
/

Moreover, I have a problem even with current working configuration 
(//RivetServerConf ChildInitScript ...,/SeparateVirtualInterps //no/). 
 From time to time (about after day of work)

I have an error related to /can not find channel named "stdout"/

Thus, I use cron to restart the apache ones an hour.

Thank you and sorry for a long mail, I am not sure that this should be 
reported as a bug, because I relatively new user of rivet,

Kind regards,

Alexey

(earlier I participated in the mailing list using email alexkarta at yahoo)


/
/



Re: rivet-2.3.3 - problem with ChildInitScript - caught SIGTERM, shutting down

Posted by Alexey Noskov <a...@n-kov.com>.
Dear Massimo and Dear All,

Finally, it looks  that the problem with SQLite was fixed!

I compiled  SQLite with/SQLITE_THREADSAFE=2/

and, as mentioned earlier, I use this configuration of rivet:

/RivetServerConf SeparateVirtualInterps yes//
//RivetServerConf SeparateChannels yes/

Now, even hundreds request from several users do not raise any error.

Thanks for very agile help,

Regards,

Alexey



On 09/22/2017 04:22 PM, Alexey Noskov wrote:
> On 09/21/2017 10:39 PM, Massimo Manghi wrote:
>> On 09/21/2017 12:02 PM, Alexey Noskov wrote:
>>> Please ignore my previous email, it looks that I have a bug in one 
>>> of the loading packages, thus script initscript is interrupted 
>>> before setting variables. I looks I will able to fix it by myself. 
>>> Sorry!
>>>
>>>
>>
>> glad you successfully figured it out yourself, but what about the 
>> database query corruptions? Did you move to postgresql?
>>
>
> Not yet, but I am going to move soon. A have a lot of Tcl
> functions  I need to use in SQL code. I'm trying to
> use PL/Tcl, as I understand it is quite limited solution. E.g. a 
> simple task  - is it possible to import packages (package require) and 
> use it in PL/Tcl functions? With SQLite it works
> perfect, you can even use global variables and open sockets from 
> Tcl/SQLite functions as it is normal proc.
>
>
>>  -- Massimo
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
>> For additional commands, e-mail: rivet-dev-help@tcl.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
> For additional commands, e-mail: rivet-dev-help@tcl.apache.org
>


Re: rivet-2.3.3 - problem with ChildInitScript - caught SIGTERM, shutting down

Posted by Alexey Noskov <a...@n-kov.com>.
On 09/21/2017 10:39 PM, Massimo Manghi wrote:
> On 09/21/2017 12:02 PM, Alexey Noskov wrote:
>> Please ignore my previous email, it looks that I have a bug in one of 
>> the loading packages, thus script initscript is interrupted before 
>> setting variables. I looks I will able to fix it by myself. Sorry!
>>
>>
>
> glad you successfully figured it out yourself, but what about the 
> database query corruptions? Did you move to postgresql?
>

Not yet, but I am going to move soon. A have a lot of Tcl
functions  I need to use in SQL code. I'm trying to
use PL/Tcl, as I understand it is quite limited solution. E.g. a simple 
task  - is it possible to import packages (package require) and use it 
in PL/Tcl functions? With SQLite it works
perfect, you can even use global variables and open sockets from 
Tcl/SQLite functions as it is normal proc.


>  -- Massimo
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
> For additional commands, e-mail: rivet-dev-help@tcl.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-dev-help@tcl.apache.org


Re: rivet-2.3.3 - problem with ChildInitScript - caught SIGTERM, shutting down

Posted by Massimo Manghi <mx...@apache.org>.
On 09/21/2017 12:02 PM, Alexey Noskov wrote:
> Please ignore my previous email, it looks that I have a bug in one of 
> the loading packages, thus script initscript is interrupted before 
> setting variables. I looks I will able to fix it by myself. Sorry!
> 
> 

glad you successfully figured it out yourself, but what about the 
database query corruptions? Did you move to postgresql?

  -- Massimo


---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-dev-help@tcl.apache.org


Re: rivet-2.3.3 - problem with ChildInitScript - caught SIGTERM, shutting down

Posted by Alexey Noskov <a...@n-kov.com>.
Please ignore my previous email, it looks that I have a bug in one of 
the loading packages, thus script initscript is interrupted before 
setting variables. I looks I will able to fix it by myself. Sorry!


On 09/21/2017 11:49 AM, Alexey Noskov wrote:
>
> Dear Massimo,
>
> As per our earlier conversation, I'd like to inform that after 
> building the latest version I don't need to restart apache 
> periodically anymore.
>
> Again thank you for the suggestion, it helped. Apache works properly 
> for many days already without any crashes.
>
> I have a new trouble, probably, because some misunderstanding of rivet 
> concepts. In order to have a several, prototypes of
>
> the web site, I need to use multiple virtualhosts with their separate 
> global variables and db connections. Thus I am trying to
>
> use this apache configuration:
>
> /RivetServerConf SeparateVirtualInterps yes//
> //RivetServerConf SeparateChannels yes/
>
> And the following in VirtualHosts:
>
> /RivetServerConf ChildInitScript "source /path/to/initscript.tcl"/
>
> The problem is that global variables and db connections defined 
> /initscript.tcl /are unreachable from *.rvt/*.tcl files of the 
> website. In my view,
>
> /ChildInitScript/ defines global variable in the master interpreter 
> instead of slave, but I am not sure. Tried to define /ChildInitScript 
> /ouside
>
> from VirtualHosts - no effect...
>
> Any suggestions?
>
> Thank you,
>
> Regards,
>
> Alexey
>
>
> On 09/13/2017 10:35 AM, Massimo Manghi wrote:
>>
>>
>> On 09/13/2017 09:43 AM, Alexey Noskov wrote:
>>> Dear Massimo,
>>>
>>> thank you for the patch and very fast responses,
>>>
>>> yesterday I finally built rivet3.0.
>>>
>>> I disabled cron job for restarting apache, after 1 day
>>>
>>> everything works fine without any crashes.
>>>
>>> I am going to try to fix problems with SQLite,
>>>
>>> in the worst case I will move to Postgres.
>>>
>>> Regards,
>>>
>>> Alexey
>>>
>>>
>>
>> Dear Alexey, thank you for reporting this to the list, do not hesitate
>> to tell us what's going on with your project in connection with Rivet
>> 3.0. You are like a beta tester in this situation so your opinion and
>> remarks are valuable.
>>
>> I recommend you move on to PostgreSQL if you can't find a safe way to
>> properly orchestrate the clients while accessing the database
>>
>>  -- Massimo
>> Il 5xmille a favore dell’Università di Parma (indicando il codice 
>> fiscale 00308780345) è un gesto tanto semplice quanto importante per 
>> creare nuove opportunità di lavoro per giovani di talento nell'ambito 
>> della ricerca scientifica.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
>> For additional commands, e-mail: rivet-dev-help@tcl.apache.org
>>
>


Re: rivet-2.3.3 - problem with ChildInitScript - caught SIGTERM, shutting down

Posted by Alexey Noskov <a...@n-kov.com>.
Dear Massimo,

As per our earlier conversation, I'd like to inform that after building 
the latest version I don't need to restart apache periodically anymore.

Again thank you for the suggestion, it helped. Apache works properly for 
many days already without any crashes.

I have a new trouble, probably, because some misunderstanding of rivet 
concepts. In order to have a several, prototypes of

the web site, I need to use multiple virtualhosts with their separate 
global variables and db connections. Thus I am trying to

use this apache configuration:

/RivetServerConf SeparateVirtualInterps yes//
//RivetServerConf SeparateChannels yes/

And the following in VirtualHosts:

/RivetServerConf ChildInitScript "source /path/to/initscript.tcl"/

The problem is that global variables and db connections defined 
/initscript.tcl /are unreachable from *.rvt/*.tcl files of the website. 
In my view,

/ChildInitScript/ defines global variable in the master interpreter 
instead of slave, but I am not sure. Tried to define /ChildInitScript 
/ouside

from VirtualHosts - no effect...

Any suggestions?

Thank you,

Regards,

Alexey


On 09/13/2017 10:35 AM, Massimo Manghi wrote:
>
>
> On 09/13/2017 09:43 AM, Alexey Noskov wrote:
>> Dear Massimo,
>>
>> thank you for the patch and very fast responses,
>>
>> yesterday I finally built rivet3.0.
>>
>> I disabled cron job for restarting apache, after 1 day
>>
>> everything works fine without any crashes.
>>
>> I am going to try to fix problems with SQLite,
>>
>> in the worst case I will move to Postgres.
>>
>> Regards,
>>
>> Alexey
>>
>>
>
> Dear Alexey, thank you for reporting this to the list, do not hesitate
> to tell us what's going on with your project in connection with Rivet
> 3.0. You are like a beta tester in this situation so your opinion and
> remarks are valuable.
>
> I recommend you move on to PostgreSQL if you can't find a safe way to
> properly orchestrate the clients while accessing the database
>
>  -- Massimo
> Il 5xmille a favore dell’Università di Parma (indicando il codice 
> fiscale 00308780345) è un gesto tanto semplice quanto importante per 
> creare nuove opportunità di lavoro per giovani di talento nell'ambito 
> della ricerca scientifica.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
> For additional commands, e-mail: rivet-dev-help@tcl.apache.org
>


Re: rivet-2.3.3 - problem with ChildInitScript - caught SIGTERM, shutting down

Posted by Massimo Manghi <ma...@unipr.it>.

On 09/13/2017 09:43 AM, Alexey Noskov wrote:
> Dear Massimo,
>
> thank you for the patch and very fast responses,
>
> yesterday I finally built rivet3.0.
>
> I disabled cron job for restarting apache, after 1 day
>
> everything works fine without any crashes.
>
> I am going to try to fix problems with SQLite,
>
> in the worst case I will move to Postgres.
>
> Regards,
>
> Alexey
>
>

Dear Alexey, thank you for reporting this to the list, do not hesitate
to tell us what's going on with your project in connection with Rivet
3.0. You are like a beta tester in this situation so your opinion and
remarks are valuable.

I recommend you move on to PostgreSQL if you can't find a safe way to
properly orchestrate the clients while accessing the database

  -- Massimo
Il 5xmille a favore dell’Università di Parma (indicando il codice fiscale 00308780345) è un gesto tanto semplice quanto importante per creare nuove opportunità di lavoro per giovani di talento nell'ambito della ricerca scientifica.

---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-dev-help@tcl.apache.org


Re: rivet-2.3.3 - problem with ChildInitScript - caught SIGTERM, shutting down

Posted by Alexey Noskov <a...@n-kov.com>.
Dear Massimo,

thank you for the patch and very fast responses,

yesterday I finally built rivet3.0.

I disabled cron job for restarting apache, after 1 day

everything works fine without any crashes.

I am going to try to fix problems with SQLite,

in the worst case I will move to Postgres.

Regards,

Alexey


On 09/12/2017 02:51 PM, Massimo Manghi wrote:
> Hi Alexey
>
> the manual generation was included in the build scripts in the attempt
> to make the whole Makefile.am compliant with the autotools packaging
> specifications. I have to reintroduce the separation between module
> compilation and manual creation but for the time being try this patch
>
> Index: doc/Makefile.am
> ===================================================================
> --- doc/Makefile.am     (revision 1804858)
> +++ doc/Makefile.am     (working copy)
> @@ -73,7 +73,7 @@
>  $(MANDIRS):
>        mkdir $@
>
> -install-data-local: docs
> +#install-data-local: docs
>
>  # this target cleans everything up in the html directory
>
>
> -- Massimo
>
>
>
> On 09/12/2017 11:48 AM, Alexey Noskov wrote:
>> Dear Massimo,
>>
>> Thank you for response!
>>
>> I checked out the latest version, but I get an error trying to execute
>> "sudo make install"
>>
>> The commands I use:
>>
>> svn co http://svn.apache.org/repos/asf/tcl/rivet/trunk rivet
>> cd rivet
>>
>> autoreconf -fi
>>
>> ./configure
>> make
>> sudo make install
>>
>>
>> Latest interrupted with the following error:
>> compilation error: file ./rivet-chunk.xsl line 39 element include
>> xsl:include : unable to load
>> /usr/share/sgml/docbook/stylesheet/xsl/nwalsh/html/chunk.xsl
>> Makefile:539: recipe for target '/html/index.html' failed
>> make[2]: *** [/html/index.html] Error 5
>> make[2]: Leaving directory '/home/src/rivet3/rivet/doc'
>> Makefile:430: recipe for target 'install-am' failed
>> make[1]: *** [install-am] Error 2
>> make[1]: Leaving directory '/home/src/rivet3/rivet/doc'
>> Makefile:499: recipe for target 'install-recursive' failed
>> make: *** [install-recursive] Error 1
>>
>>
>> I tried to use "./configure --disable-docs"
>> but it returns
>>     configure: WARNING: unrecognized options: --disable-docs
>>
>> I very appreciate for any help.
>>
>> Thank you,
>>
>> Alexey
>>
>>
>>
>> On 09/11/2017 04:14 PM, Massimo Manghi wrote:
>>> Dear Alexey
>>>
>>> From your words I gather that you are running a threaded MPM which is a
>>> problem with rivet 2.x (the error you're showing at the end of the
>>> message is most probably due to an invalid threaded MPM)
>>>
>>> Threaded MPMs are supported by rivet 3.0 which is due to be released in
>>> a month or two, you can download it checking out our repository
>>>
>>> On 09/11/2017 11:56 AM, Alexey Noskov wrote:
>>>> Dear all,
>>>>
>>>> I develop a web service https://gsdr.gq.
>>>>
>>>> SQLite/Spatialite is used as database. Because of multiple massive
>>>> requests from time to time.
>>>>
>>>> SQL requests are interrupted with "malformed database schema". As I
>>>> understand, Sqlite
>>>>
>>>> by default uses serialized mode for multi threading support.
>>>>
>>>> (More information about threading in SQLite can be found here
>>>> https://sqlite.org/threadsafe.html )
>>>>
>>>> Probably, this is the reason
>>>>
>>>> of the "malformed" (about every 20-40th SQL request is interrupted 
>>>> with
>>>> this error). I would
>>>>
>>>> like to try to switch SQLite to multi-thread mode and use:
>>>>
>>>> /RivetServerConf SeparateVirtualInterps yes//
>>>> //RivetServerConf SeparateChannels yes/
>>>>
>>>> This allows to use independent database connections for each child and
>>>> will hopefully resolve as error.
>>>
>>> As far as I understand SQLite is not like Postgresql or Mysql in this
>>> respect, you're opening a file, not connecting to a service in a client
>>> server fashion (if I'm wrong and SQLite has now this ability forgive my
>>> ignorance). I'm afraid you're having these "malformed database schema"
>>> errors because you have multiple clients trying to access non protected
>>> data structures of the SQLite db
>>>
>>>>
>>>> Currently I use /RivetServerConf ServerInitScript "source
>>>> /home/local/rivetfiles/initscript.tcl"/.
>>>>
>>>
>>> SeparateVirtualInterps creates interpreters for each virtual host, this
>>> has nothing to do with threads. But even if you switched to the
>>> 'prefork' MPM, thus eliminating any multithreading, you would end up
>>> with a set of child processes running each an interpreter (one
>>> interpreter per virtual host if SeparateVirtualInterps On) and you 
>>> would
>>> need to synchronize them
>>>
>>>> When I use the following configuration:
>>>>
>>>> /RivetServerConf ChildInitScript "source
>>>> /home/local/rivetfiles/initscript.tcl"//
>>>> //RivetServerConf SeparateVirtualInterps yes//
>>>> //RivetServerConf SeparateChannels yes/
>>>>
>>>> Apache rises this error:
>>>> [...]
>>>> I use Debian Jessie  ARM architecture ( aarch64). rivet-2.3.3 built 
>>>> from
>>>> source. Apache 2.4.10 and SQLite 3.8.7.1 from repository.
>>>>
>>>
>>> the errors that eventually result in a segmentation fault are quite
>>> certainly due to a threaded MPM. If I understand correctly then enable
>>> prefork on Debian with the command
>>>
>>> a2enmod mpm_prefork
>>>
>>>> I tried different configurations and detected that SEGTERM appeared
>>>> because of /RivetServerConf ChildInitScript "source
>>>> /home/local/rivetfiles/initscript.tcl"//
>>>> /
>>>>
>>>> Moreover, I have a problem even with current working configuration
>>>> (//RivetServerConf ChildInitScript ...,/SeparateVirtualInterps //no/).
>>>>  From time to time (about after day of work)
>>>>
>>>> I have an error related to /can not find channel named "stdout"/
>>>>
>>>> Thus, I use cron to restart the apache ones an hour.
>>>>
>>>> Thank you and sorry for a long mail, I am not sure that this should be
>>>> reported as a bug, because I relatively new user of rivet,
>>>>
>>>> Kind regards,
>>>>
>>>> Alexey
>>>
>>> please let us know if my words can be of any help
>>>
>>>  -- Massimo
>>> Il 5xmille a favore dell’Università di Parma (indicando il codice
>>> fiscale 00308780345) è un gesto tanto semplice quanto importante per
>>> creare nuove opportunità di lavoro per giovani di talento nell'ambito
>>> della ricerca scientifica.
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
>>> For additional commands, e-mail: rivet-dev-help@tcl.apache.org
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
>> For additional commands, e-mail: rivet-dev-help@tcl.apache.org
>>
> Il 5xmille a favore dell’Università di Parma (indicando il codice 
> fiscale 00308780345) è un gesto tanto semplice quanto importante per 
> creare nuove opportunità di lavoro per giovani di talento nell'ambito 
> della ricerca scientifica.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
> For additional commands, e-mail: rivet-dev-help@tcl.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-dev-help@tcl.apache.org


Re: rivet-2.3.3 - problem with ChildInitScript - caught SIGTERM, shutting down

Posted by Massimo Manghi <ma...@unipr.it>.
Hi Alexey

the manual generation was included in the build scripts in the attempt
to make the whole Makefile.am compliant with the autotools packaging
specifications. I have to reintroduce the separation between module
compilation and manual creation but for the time being try this patch

Index: doc/Makefile.am
===================================================================
--- doc/Makefile.am     (revision 1804858)
+++ doc/Makefile.am     (working copy)
@@ -73,7 +73,7 @@
  $(MANDIRS):
        mkdir $@

-install-data-local: docs
+#install-data-local: docs

  # this target cleans everything up in the html directory


-- Massimo



On 09/12/2017 11:48 AM, Alexey Noskov wrote:
> Dear Massimo,
>
> Thank you for response!
>
> I checked out the latest version, but I get an error trying to execute
> "sudo make install"
>
> The commands I use:
>
> svn co http://svn.apache.org/repos/asf/tcl/rivet/trunk rivet
> cd rivet
>
> autoreconf -fi
>
> ./configure
> make
> sudo make install
>
>
> Latest interrupted with the following error:
> compilation error: file ./rivet-chunk.xsl line 39 element include
> xsl:include : unable to load
> /usr/share/sgml/docbook/stylesheet/xsl/nwalsh/html/chunk.xsl
> Makefile:539: recipe for target '/html/index.html' failed
> make[2]: *** [/html/index.html] Error 5
> make[2]: Leaving directory '/home/src/rivet3/rivet/doc'
> Makefile:430: recipe for target 'install-am' failed
> make[1]: *** [install-am] Error 2
> make[1]: Leaving directory '/home/src/rivet3/rivet/doc'
> Makefile:499: recipe for target 'install-recursive' failed
> make: *** [install-recursive] Error 1
>
>
> I tried to use "./configure --disable-docs"
> but it returns
>     configure: WARNING: unrecognized options: --disable-docs
>
> I very appreciate for any help.
>
> Thank you,
>
> Alexey
>
>
>
> On 09/11/2017 04:14 PM, Massimo Manghi wrote:
>> Dear Alexey
>>
>> From your words I gather that you are running a threaded MPM which is a
>> problem with rivet 2.x (the error you're showing at the end of the
>> message is most probably due to an invalid threaded MPM)
>>
>> Threaded MPMs are supported by rivet 3.0 which is due to be released in
>> a month or two, you can download it checking out our repository
>>
>> On 09/11/2017 11:56 AM, Alexey Noskov wrote:
>>> Dear all,
>>>
>>> I develop a web service https://gsdr.gq.
>>>
>>> SQLite/Spatialite is used as database. Because of multiple massive
>>> requests from time to time.
>>>
>>> SQL requests are interrupted with "malformed database schema". As I
>>> understand, Sqlite
>>>
>>> by default uses serialized mode for multi threading support.
>>>
>>> (More information about threading in SQLite can be found here
>>> https://sqlite.org/threadsafe.html )
>>>
>>> Probably, this is the reason
>>>
>>> of the "malformed" (about every 20-40th SQL request is interrupted with
>>> this error). I would
>>>
>>> like to try to switch SQLite to multi-thread mode and use:
>>>
>>> /RivetServerConf SeparateVirtualInterps yes//
>>> //RivetServerConf SeparateChannels yes/
>>>
>>> This allows to use independent database connections for each child and
>>> will hopefully resolve as error.
>>
>> As far as I understand SQLite is not like Postgresql or Mysql in this
>> respect, you're opening a file, not connecting to a service in a client
>> server fashion (if I'm wrong and SQLite has now this ability forgive my
>> ignorance). I'm afraid you're having these "malformed database schema"
>> errors because you have multiple clients trying to access non protected
>> data structures of the SQLite db
>>
>>>
>>> Currently I use /RivetServerConf ServerInitScript "source
>>> /home/local/rivetfiles/initscript.tcl"/.
>>>
>>
>> SeparateVirtualInterps creates interpreters for each virtual host, this
>> has nothing to do with threads. But even if you switched to the
>> 'prefork' MPM, thus eliminating any multithreading, you would end up
>> with a set of child processes running each an interpreter (one
>> interpreter per virtual host if SeparateVirtualInterps On) and you would
>> need to synchronize them
>>
>>> When I use the following configuration:
>>>
>>> /RivetServerConf ChildInitScript "source
>>> /home/local/rivetfiles/initscript.tcl"//
>>> //RivetServerConf SeparateVirtualInterps yes//
>>> //RivetServerConf SeparateChannels yes/
>>>
>>> Apache rises this error:
>>> [...]
>>> I use Debian Jessie  ARM architecture ( aarch64). rivet-2.3.3 built from
>>> source. Apache 2.4.10 and SQLite 3.8.7.1 from repository.
>>>
>>
>> the errors that eventually result in a segmentation fault are quite
>> certainly due to a threaded MPM. If I understand correctly then enable
>> prefork on Debian with the command
>>
>> a2enmod mpm_prefork
>>
>>> I tried different configurations and detected that SEGTERM appeared
>>> because of /RivetServerConf ChildInitScript "source
>>> /home/local/rivetfiles/initscript.tcl"//
>>> /
>>>
>>> Moreover, I have a problem even with current working configuration
>>> (//RivetServerConf ChildInitScript ...,/SeparateVirtualInterps //no/).
>>>  From time to time (about after day of work)
>>>
>>> I have an error related to /can not find channel named "stdout"/
>>>
>>> Thus, I use cron to restart the apache ones an hour.
>>>
>>> Thank you and sorry for a long mail, I am not sure that this should be
>>> reported as a bug, because I relatively new user of rivet,
>>>
>>> Kind regards,
>>>
>>> Alexey
>>
>> please let us know if my words can be of any help
>>
>>  -- Massimo
>> Il 5xmille a favore dell’Università di Parma (indicando il codice
>> fiscale 00308780345) è un gesto tanto semplice quanto importante per
>> creare nuove opportunità di lavoro per giovani di talento nell'ambito
>> della ricerca scientifica.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
>> For additional commands, e-mail: rivet-dev-help@tcl.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
> For additional commands, e-mail: rivet-dev-help@tcl.apache.org
>
Il 5xmille a favore dell’Università di Parma (indicando il codice fiscale 00308780345) è un gesto tanto semplice quanto importante per creare nuove opportunità di lavoro per giovani di talento nell'ambito della ricerca scientifica.

---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-dev-help@tcl.apache.org


Re: rivet-2.3.3 - problem with ChildInitScript - caught SIGTERM, shutting down

Posted by Alexey Noskov <a...@n-kov.com>.
Dear Massimo,

Thank you for response!

I checked out the latest version, but I get an error trying to execute 
"sudo make install"

The commands I use:

svn co http://svn.apache.org/repos/asf/tcl/rivet/trunk rivet
cd rivet

autoreconf -fi

./configure
make
sudo make install


Latest interrupted with the following error:
compilation error: file ./rivet-chunk.xsl line 39 element include
xsl:include : unable to load 
/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/html/chunk.xsl
Makefile:539: recipe for target '/html/index.html' failed
make[2]: *** [/html/index.html] Error 5
make[2]: Leaving directory '/home/src/rivet3/rivet/doc'
Makefile:430: recipe for target 'install-am' failed
make[1]: *** [install-am] Error 2
make[1]: Leaving directory '/home/src/rivet3/rivet/doc'
Makefile:499: recipe for target 'install-recursive' failed
make: *** [install-recursive] Error 1


I tried to use "./configure --disable-docs"
but it returns
    configure: WARNING: unrecognized options: --disable-docs

I very appreciate for any help.

Thank you,

Alexey



On 09/11/2017 04:14 PM, Massimo Manghi wrote:
> Dear Alexey
>
> From your words I gather that you are running a threaded MPM which is a
> problem with rivet 2.x (the error you're showing at the end of the
> message is most probably due to an invalid threaded MPM)
>
> Threaded MPMs are supported by rivet 3.0 which is due to be released in
> a month or two, you can download it checking out our repository
>
> On 09/11/2017 11:56 AM, Alexey Noskov wrote:
>> Dear all,
>>
>> I develop a web service https://gsdr.gq.
>>
>> SQLite/Spatialite is used as database. Because of multiple massive
>> requests from time to time.
>>
>> SQL requests are interrupted with "malformed database schema". As I
>> understand, Sqlite
>>
>> by default uses serialized mode for multi threading support.
>>
>> (More information about threading in SQLite can be found here
>> https://sqlite.org/threadsafe.html )
>>
>> Probably, this is the reason
>>
>> of the "malformed" (about every 20-40th SQL request is interrupted with
>> this error). I would
>>
>> like to try to switch SQLite to multi-thread mode and use:
>>
>> /RivetServerConf SeparateVirtualInterps yes//
>> //RivetServerConf SeparateChannels yes/
>>
>> This allows to use independent database connections for each child and
>> will hopefully resolve as error.
>
> As far as I understand SQLite is not like Postgresql or Mysql in this
> respect, you're opening a file, not connecting to a service in a client
> server fashion (if I'm wrong and SQLite has now this ability forgive my
> ignorance). I'm afraid you're having these "malformed database schema"
> errors because you have multiple clients trying to access non protected
> data structures of the SQLite db
>
>>
>> Currently I use /RivetServerConf ServerInitScript "source
>> /home/local/rivetfiles/initscript.tcl"/.
>>
>
> SeparateVirtualInterps creates interpreters for each virtual host, this
> has nothing to do with threads. But even if you switched to the
> 'prefork' MPM, thus eliminating any multithreading, you would end up
> with a set of child processes running each an interpreter (one
> interpreter per virtual host if SeparateVirtualInterps On) and you would
> need to synchronize them
>
>> When I use the following configuration:
>>
>> /RivetServerConf ChildInitScript "source
>> /home/local/rivetfiles/initscript.tcl"//
>> //RivetServerConf SeparateVirtualInterps yes//
>> //RivetServerConf SeparateChannels yes/
>>
>> Apache rises this error:
>> [...]
>> I use Debian Jessie  ARM architecture ( aarch64). rivet-2.3.3 built from
>> source. Apache 2.4.10 and SQLite 3.8.7.1 from repository.
>>
>
> the errors that eventually result in a segmentation fault are quite
> certainly due to a threaded MPM. If I understand correctly then enable
> prefork on Debian with the command
>
> a2enmod mpm_prefork
>
>> I tried different configurations and detected that SEGTERM appeared
>> because of /RivetServerConf ChildInitScript "source
>> /home/local/rivetfiles/initscript.tcl"//
>> /
>>
>> Moreover, I have a problem even with current working configuration
>> (//RivetServerConf ChildInitScript ...,/SeparateVirtualInterps //no/).
>>  From time to time (about after day of work)
>>
>> I have an error related to /can not find channel named "stdout"/
>>
>> Thus, I use cron to restart the apache ones an hour.
>>
>> Thank you and sorry for a long mail, I am not sure that this should be
>> reported as a bug, because I relatively new user of rivet,
>>
>> Kind regards,
>>
>> Alexey
>
> please let us know if my words can be of any help
>
>  -- Massimo
> Il 5xmille a favore dell’Università di Parma (indicando il codice 
> fiscale 00308780345) è un gesto tanto semplice quanto importante per 
> creare nuove opportunità di lavoro per giovani di talento nell'ambito 
> della ricerca scientifica.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
> For additional commands, e-mail: rivet-dev-help@tcl.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-dev-help@tcl.apache.org


Re: rivet-2.3.3 - problem with ChildInitScript - caught SIGTERM, shutting down

Posted by Massimo Manghi <ma...@unipr.it>.
Dear Alexey

 From your words I gather that you are running a threaded MPM which is a
problem with rivet 2.x (the error you're showing at the end of the
message is most probably due to an invalid threaded MPM)

Threaded MPMs are supported by rivet 3.0 which is due to be released in
a month or two, you can download it checking out our repository

On 09/11/2017 11:56 AM, Alexey Noskov wrote:
> Dear all,
>
> I develop a web service https://gsdr.gq.
>
> SQLite/Spatialite is used as database. Because of multiple massive
> requests from time to time.
>
> SQL requests are interrupted with "malformed database schema". As I
> understand, Sqlite
>
> by default uses serialized mode for multi threading support.
>
> (More information about threading in SQLite can be found here
> https://sqlite.org/threadsafe.html )
>
> Probably, this is the reason
>
> of the "malformed" (about every 20-40th SQL request is interrupted with
> this error). I would
>
> like to try to switch SQLite to multi-thread mode and use:
>
> /RivetServerConf SeparateVirtualInterps yes//
> //RivetServerConf SeparateChannels yes/
>
> This allows to use independent database connections for each child and
> will hopefully resolve as error.

As far as I understand SQLite is not like Postgresql or Mysql in this
respect, you're opening a file, not connecting to a service in a client
server fashion (if I'm wrong and SQLite has now this ability forgive my
ignorance). I'm afraid you're having these "malformed database schema"
errors because you have multiple clients trying to access non protected
data structures of the SQLite db

>
> Currently I use /RivetServerConf ServerInitScript "source
> /home/local/rivetfiles/initscript.tcl"/.
>

SeparateVirtualInterps creates interpreters for each virtual host, this
has nothing to do with threads. But even if you switched to the
'prefork' MPM, thus eliminating any multithreading, you would end up
with a set of child processes running each an interpreter (one
interpreter per virtual host if SeparateVirtualInterps On) and you would
need to synchronize them

> When I use the following configuration:
>
> /RivetServerConf ChildInitScript "source
> /home/local/rivetfiles/initscript.tcl"//
> //RivetServerConf SeparateVirtualInterps yes//
> //RivetServerConf SeparateChannels yes/
>
> Apache rises this error:
> [...]
> I use Debian Jessie  ARM architecture ( aarch64). rivet-2.3.3 built from
> source. Apache 2.4.10 and SQLite 3.8.7.1 from repository.
>

the errors that eventually result in a segmentation fault are quite
certainly due to a threaded MPM. If I understand correctly then enable
prefork on Debian with the command

a2enmod mpm_prefork

> I tried different configurations and detected that SEGTERM appeared
> because of /RivetServerConf ChildInitScript "source
> /home/local/rivetfiles/initscript.tcl"//
> /
>
> Moreover, I have a problem even with current working configuration
> (//RivetServerConf ChildInitScript ...,/SeparateVirtualInterps //no/).
>  From time to time (about after day of work)
>
> I have an error related to /can not find channel named "stdout"/
>
> Thus, I use cron to restart the apache ones an hour.
>
> Thank you and sorry for a long mail, I am not sure that this should be
> reported as a bug, because I relatively new user of rivet,
>
> Kind regards,
>
> Alexey

please let us know if my words can be of any help

  -- Massimo
Il 5xmille a favore dell’Università di Parma (indicando il codice fiscale 00308780345) è un gesto tanto semplice quanto importante per creare nuove opportunità di lavoro per giovani di talento nell'ambito della ricerca scientifica.

---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-dev-help@tcl.apache.org