Hi everybody, this is a little OT. We are using Lighttpd as a webserver for Rails. Our problem is that when we rotate the logs everyday at the end of the process, lighttpd stops writing the logs. To solve this we have to restart the server manually each time. We use a common Debian, lighttpd-1.4.7, Rails 1.0 and fcgi-2.4.0. I have tracked the lighttpd bugs, and I haven''t found anything. Any suggestion or personal experience? -- Fernando Blat
Fernando Blat wrote:> Hi everybody, > > this is a little OT. We are using Lighttpd as a webserver for Rails. > Our problem is that when we rotate the logs everyday at the end of the > process, lighttpd stops writing the logs. To solve this we have to > restart the server manually each time. > > We use a common Debian, lighttpd-1.4.7, Rails 1.0 and fcgi-2.4.0. > > I have tracked the lighttpd bugs, and I haven''t found anything. > > Any suggestion or personal experience?It''s not something I''ve come across personally, but this seems relevant: http://article.gmane.org/gmane.comp.web.lighttpd/3211 -- Alex
On Jan 23, 2006, at 1:49 AM, Fernando Blat wrote:> Hi everybody, > > this is a little OT. We are using Lighttpd as a webserver for Rails. > Our problem is that when we rotate the logs everyday at the end of the > process, lighttpd stops writing the logs. To solve this we have to > restart the server manually each time. > > We use a common Debian, lighttpd-1.4.7, Rails 1.0 and fcgi-2.4.0. > > I have tracked the lighttpd bugs, and I haven''t found anything. > > Any suggestion or personal experience? > > -- > > Fernando Blat > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >Fernando- The way I get around this is a custom script that first copies the log file to a backup dir and tar.gzips it. And then instead of deleting the log and making a new on, all I do is this: $ echo '''' > lighttpd_access.log That way the same log file gets used but you just make it empty instead of replacing it. Cheers- -Ezra Zygmuntowicz Yakima Herald-Republic WebMaster http://yakimaherald.com 509-577-7732 ezra@yakima-herald.com
Kelly Dwight Felkins
2006-Jan-23 19:09 UTC
[Rails] OT: Problem rotating logs with lighttpd
I installed lighttpd using a debian package from here: http://apt.utsl.gen.nz/debian/pool/sarge-i386/lighttpd_1.4.5-1_i386.deb (Suggested by the great folks at Rimu Hosting). This installs lighttpd consistent with debian standards. So, log rotate runs and rotates the logs just fine. -Kelly On 1/23/06, Ezra Zygmuntowicz <ezra@yakima-herald.com> wrote:> > > On Jan 23, 2006, at 1:49 AM, Fernando Blat wrote: > > > Hi everybody, > > > > this is a little OT. We are using Lighttpd as a webserver for Rails. > > Our problem is that when we rotate the logs everyday at the end of the > > process, lighttpd stops writing the logs. To solve this we have to > > restart the server manually each time. > > > > We use a common Debian, lighttpd-1.4.7, Rails 1.0 and fcgi-2.4.0. > > > > I have tracked the lighttpd bugs, and I haven''t found anything. > > > > Any suggestion or personal experience? > > > > -- > > > > Fernando Blat > > _______________________________________________ > > Rails mailing list > > Rails@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > Fernando- > > The way I get around this is a custom script that first copies the > log file to a backup dir and tar.gzips it. And then instead of > deleting the log and making a new on, all I do is this: > > $ echo '''' > lighttpd_access.log > > That way the same log file gets used but you just make it empty > instead of replacing it. > > > Cheers- > -Ezra Zygmuntowicz > Yakima Herald-Republic > WebMaster > http://yakimaherald.com > 509-577-7732 > ezra@yakima-herald.com > > > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060123/282af33c/attachment.html
Thanks for your answers (and sorry for my English). Tomorrow we''ll test that and I''ll tell you if it works :) 2006/1/23, Kelly Dwight Felkins <railsinator@gmail.com>:> I installed lighttpd using a debian package from here: > > http://apt.utsl.gen.nz/debian/pool/sarge-i386/lighttpd_1.4.5-1_i386.deb > > > (Suggested by the great folks at Rimu Hosting). > > This installs lighttpd consistent with debian standards. So, log rotate runs > and rotates the logs just fine. > > -Kelly > > > > On 1/23/06, Ezra Zygmuntowicz <ezra@yakima-herald.com> wrote: > > > > On Jan 23, 2006, at 1:49 AM, Fernando Blat wrote: > > > > > Hi everybody, > > > > > > this is a little OT. We are using Lighttpd as a webserver for Rails. > > > Our problem is that when we rotate the logs everyday at the end of the > > > process, lighttpd stops writing the logs. To solve this we have to > > > restart the server manually each time. > > > > > > We use a common Debian, lighttpd-1.4.7, Rails 1.0 and fcgi-2.4.0. > > > > > > I have tracked the lighttpd bugs, and I haven''t found anything. > > > > > > Any suggestion or personal experience? > > > > > > -- > > > > > > Fernando Blat > > > _______________________________________________ > > > Rails mailing list > > > Rails@lists.rubyonrails.org > > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > > Fernando- > > > > The way I get around this is a custom script that first copies the > > log file to a backup dir and tar.gzips it. And then instead of > > deleting the log and making a new on, all I do is this: > > > > $ echo '''' > lighttpd_access.log > > > > That way the same log file gets used but you just make it empty > > instead of replacing it. > > > > > > Cheers- > > -Ezra Zygmuntowicz > > Yakima Herald-Republic > > WebMaster > > http://yakimaherald.com > > 509-577-7732 > > ezra@yakima-herald.com > > > > > > > > _______________________________________________ > > Rails mailing list > > Rails@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > >-- Fernando Blat
There is a more current lighttpd.deb file that bougyman maintains. Last time I checked it was at version 1.4.8 and includes all the debian specific stuff. Just do the follwing: $ sudo echo "deb http://debian.bougyman.com unstable main" >> /etc/ apt/sources.list $ sudo apt-get update $ sudo apt-get install lighttpd Cheers- -Ezra On Jan 23, 2006, at 11:09 AM, Kelly Dwight Felkins wrote:> I installed lighttpd using a debian package from here: > > http://apt.utsl.gen.nz/debian/pool/sarge-i386/ > lighttpd_1.4.5-1_i386.deb > (Suggested by the great folks at Rimu Hosting). > > This installs lighttpd consistent with debian standards. So, log > rotate runs and rotates the logs just fine. > > -Kelly > > > On 1/23/06, Ezra Zygmuntowicz <ezra@yakima-herald.com> wrote: > On Jan 23, 2006, at 1:49 AM, Fernando Blat wrote: > > > Hi everybody, > > > > this is a little OT. We are using Lighttpd as a webserver for Rails. > > Our problem is that when we rotate the logs everyday at the end > of the > > process, lighttpd stops writing the logs. To solve this we have to > > restart the server manually each time. > > > > We use a common Debian, lighttpd-1.4.7, Rails 1.0 and fcgi-2.4.0. > > > > I have tracked the lighttpd bugs, and I haven''t found anything. > > > > Any suggestion or personal experience? > > > > -- > > > > Fernando Blat > > _______________________________________________ > > Rails mailing list > > Rails@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > Fernando- > > The way I get around this is a custom script that first > copies the > log file to a backup dir and tar.gzips it. And then instead of > deleting the log and making a new on, all I do is this: > > $ echo '''' > lighttpd_access.log > > That way the same log file gets used but you just make it > empty > instead of replacing it. > > > Cheers- > -Ezra Zygmuntowicz > Yakima Herald-Republic > WebMaster > http://yakimaherald.com > 509-577-7732 > ezra@yakima-herald.com > > > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails-Ezra Zygmuntowicz Yakima Herald-Republic WebMaster http://yakimaherald.com 509-577-7732 ezra@yakima-herald.com
Ezra Zygmuntowicz wrote:> > The way I get around this is a custom script that first copies the > log file to a backup dir and tar.gzips it. And then instead of > deleting the log and making a new on, all I do is this: > > $ echo '''' > lighttpd_access.log > > That way the same log file gets used but you just make it empty > instead of replacing it.Is there a way to do that without fear of losing lines placed in the log since the copy? Granted at 2 AM there probably wouldn''t be many (except for robots). csn -- Posted via http://www.ruby-forum.com/.
Ezra Zygmuntowicz wrote:> There is a more current lighttpd.deb file that bougyman maintains. > Last time I checked it was at version 1.4.8 and includes all the > debian specific stuff. Just do the follwing: > > $ sudo echo "deb http://debian.bougyman.com unstable main" >> /etc/ > apt/sources.list > $ sudo apt-get update > $ sudo apt-get install lighttpd > > Cheers- > -EzraWe''ll try that version. Now, the problem begins after the logrotate rotates the logs. -- Posted via http://www.ruby-forum.com/.
After some days I come back with this topic again, because I have found this two links: http://trac.lighttpd.net/trac/ticket/404 http://trac.lighttpd.net/trac/wiki/MigratingFromApache So, maybe the problem is that Lighttpd doesn''t handle the SIGHUP signal, so it stops writting the logs and, maybe, the solution is to use the lighttpd Debian package or use cronolog instead of logrotate. 2006/1/29, Fernando <ferblape@gmail.com>:> Ezra Zygmuntowicz wrote: > > There is a more current lighttpd.deb file that bougyman maintains. > > Last time I checked it was at version 1.4.8 and includes all the > > debian specific stuff. Just do the follwing: > > > > $ sudo echo "deb http://debian.bougyman.com unstable main" >> /etc/ > > apt/sources.list > > $ sudo apt-get update > > $ sudo apt-get install lighttpd > > > > Cheers- > > -Ezra > > We''ll try that version. > > Now, the problem begins after the logrotate rotates the logs. > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- Fernando Blat