hbz / lobid-resources

Transformation, web frontend, and API for the hbz catalog as LOD
http://lobid.org/resources
Eclipse Public License 2.0
7 stars 7 forks source link

Automatically restart lobid API 1.0 once a week to cure memory leak when scrolling #521

Closed dr0i closed 6 years ago

dr0i commented 6 years ago

Werner Gresshoff reported that scrolling like http://lobid.org/resource?q=*&scroll=20160201 don't work anymore. The cause is the memory leak reported in hbz/lobid#188 .Also,the Xms java option wasn't set to 8Gb, and the threshold when allocating dynamically the new memory is obviously very low, lower than the threshold which brakes the scrolling down (part of the api to give the api some time to restore some memory). However, it's helpful if the application is restarted from time to time. With the load balancer in hbz/lobid-resources#510 this can be done automatically. Restart of the lobid instance is done once a week every tuesday at 7:00 am, taking around 1 minute. Every request will be load balanced seamlessly, however the scroll requests are not stateless, thus doing a scroll request when restarting the api the scroll request will not survive.

dr0i commented 6 years ago

Added Xms into monit. Configured load balancer in apache vhost. Scheduled in cron. Closing.