Possible memory leak when using ZOOM libraries with Zebra

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Possible memory leak when using ZOOM libraries with Zebra

David Cook

Hi all,

 

I’ve been playing with the ZOOM libraries and Zebra, and it seems like there’s a memory leak when using C4::Context->Zconn with the environmental variable GATEWAY_INTERFACE.

 

I had a script that was creating a new connection for each request, and C4::Context->Zconn did look like it was calling the destroy method on the connection before creating a new one, and it was clear that each request was using a new connection, but I noticed the memory usage on the script slowly started going up. For a long-running script, the memory usage got over a gigabyte.

 

If I re-use the connection (ie don’t have GATEWAY_INTERFACE turned on), there’s no memory leak.

 

It shouldn’t matter for CGI Koha, but I’m curious how this might affect Plack Koha. I haven’t looked yet, but I figured it was worth sharing my observation. I suppose Plack recycles workers, so it’s not dangerous, but I wonder if this is affecting the memory usage of Plack workers. Food for thought at least.

 

David Cook

Systems Librarian

Prosentient Systems

72/330 Wattle St

Ultimo, NSW 2007

Australia

 

Office: 02 9212 0899

Direct: 02 8005 0595

 


_______________________________________________
Koha-devel mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

Re: Possible memory leak when using ZOOM libraries with Zebra

Fridolin SOMERS
Thanks for this alert.
Zebra is a wild animal ;)

Le 19/12/2018 à 02:08, David Cook a écrit :

> Hi all,
>
>  
>
> I've been playing with the ZOOM libraries and Zebra, and it seems like
> there's a memory leak when using C4::Context->Zconn with the environmental
> variable GATEWAY_INTERFACE.
>
>  
>
> I had a script that was creating a new connection for each request, and
> C4::Context->Zconn did look like it was calling the destroy method on the
> connection before creating a new one, and it was clear that each request was
> using a new connection, but I noticed the memory usage on the script slowly
> started going up. For a long-running script, the memory usage got over a
> gigabyte.
>
>  
>
> If I re-use the connection (ie don't have GATEWAY_INTERFACE turned on),
> there's no memory leak.
>
>  
>
> It shouldn't matter for CGI Koha, but I'm curious how this might affect
> Plack Koha. I haven't looked yet, but I figured it was worth sharing my
> observation. I suppose Plack recycles workers, so it's not dangerous, but I
> wonder if this is affecting the memory usage of Plack workers. Food for
> thought at least.
>
>  
>
> David Cook
>
> Systems Librarian
>
> Prosentient Systems
>
> 72/330 Wattle St
>
> Ultimo, NSW 2007
>
> Australia
>
>  
>
> Office: 02 9212 0899
>
> Direct: 02 8005 0595
>
>  
>
>
>
> _______________________________________________
> Koha-devel mailing list
> [hidden email]
> http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
> website : http://www.koha-community.org/
> git : http://git.koha-community.org/
> bugs : http://bugs.koha-community.org/
>

--
Fridolin SOMERS <[hidden email]>
BibLibre, France - software and system maintainer
_______________________________________________
Koha-devel mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/