FIREBIRD 3.X LINGER INTERNAL BUG -------------------------------- Key: CORE-5971 URL: http://tracker.firebirdsql.org/browse/CORE-5971 Project: Firebird Core Issue Type: Bug Components: Engine Affects Versions: 3.0.4 Environment: linux-x64 Reporter: Pedro Santos Priority: Critical
using linux Ubuntu 16.04.5 LTS x64 with Firebird-3.0.4.33054-0.amd64.tar.gz After recently migrated our production servers (linux x64) to Firebird 3.0.4 to use the LINGER feature (keeping the database in memory between requests from a web server) and after configuring the LINGER parameter of each database (each server has multiple client databases) we began noticing that the server memory is never recovered even when there's no client database activity. So i download the release 3.0.4 source code did some reading i think i found the culprit: firebird-R3_0_4\src\jrd\jrd.cpp line 6560: ... FbLocalStatus s; dbb->dbb_plugin_config->setReleaseDelay(&s, maxLinger > t ? (maxLinger - t) * 1000 * 1000 : 0); check(&s); ... the function setReleaseDelay will seems to accept the second parameter in miliseconds not microseconds. so if for example configure the database with ALTER DATABASE SET LINGER TO 900; (900 seconds or 15 minutes) the value applied in the setReleaseDelay(..) will be 900 * 1000 * 1000 = 900000000 or 10.41 days from miliseconds or 15 minutes from microseconds it seems the value is processed in miliseconds (10days) because in our production servers the databases never leave memory. Already compiled and tested a internal 3.0.4 version without the 2 x 1000 and works as suposed to 900 seconds later the database file handle is released from memory. (used lsof -p <firebird pid> to check firebird handles to the database files.) i hope we can clear if the setReleaseDelay(..) value is microseconds or miliseconds excuse my "English" and thanks -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://tracker.firebirdsql.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel