We are using Redmine. The mysql adapter segfaults in the mornings when the first Redmine operation is attempted, e.g. clicking on the Projects menu. Redmine works perfectly after Webrick is manually restarted.
The problem is that the mysql gem was compiled against MySQL 5.0, but we are using a later MySQL version. This is what I learned on the official Redmine issue tracker. For the moment, I am not going to attempt to recompile against our version.
I have a vbscript script that can restart the server during the very early hours of the morning. The vbscript script runs a batch file containing ruby script/server webrick -e production
which can start webrick, but if webrick is already running, the script does not make a difference. I need a command that can stop the server.
I had a similar issue when installed on a windows system - after 8 hours of activity, the mysql adapter would segfault.
The fix was to place an other mysql binary in the ruby\bin.
The issue is described in the forum, and the link to an other dll is provided in the installation manual.
On a side note, but not really related to this issue: The question is tagged webrick, be aware that you should run redmine on mongrel instead of webrick. The above linked wiki page also says:
It is not recommended to use webrick for anything other than development.