4 ms·
Well, in Python world we did just like what OP described: use uWSGI to respawn a new worker after certain number of requests. Edit: alright, I got downvoted fo
by est 12y ago
Well, in Python world we did just like what OP described: use uWSGI to respawn a new worker after certain number of requests.
Edit: alright, I got downvoted for speaking a fact. Don't get me wrong, OP's article is great, but not everyone has control over the underlying code, nor has enough time to tinker into runtime nuances.
To confess I have maintained >100K LoC Python/Ruby projects, yet the respawn way is the most effective and easiest mitigation method available and I think it's likely to continue to be in a very long time.
- johnlinvc 12y agoWe can also do that with unicorn-worker-killer.
- gry 12y agoLipstick on a pig. Exactly what the author calls out: "Sadly, most Ruby devs out there simply employ monit , inspeqtor or unicorn worker killers. This allows you to move along and do more important work, tidily sweeping the problem snugly under the carpet." The author describes a mindset to solve the underlying problem. Endemic to any language.
- mercurial 12y ago"I'm not a real programmer. I throw together things until it works then I move on. The real programmers will say "Yeah it works but you're leaking memory everywhere. Perhaps we should fix that." I’ll just restart Apache every 10 requests." Rasmus Lerdorf More endemic in some languages than others.
- codinghorror 12y agoI sourced that because I was curious... these quotes are terrifying: http://en.wikiquote.org/wiki/Rasmus_Lerdorf http://en.wikiquote.org/wiki/Rasmus_Lerdorf I mean, I'd be first person to tell you that I am a scripter at heart, but I would never, ever say "I don't care about this [computer science] crap at all." I feel like my job is to defer to the many programmers that are smarter than I am. Including the parser and compiler and linker etc
- unfunco 12y agoTerrifying? Really? PHP is (admittedly slowly) moving in a positive direction because of community effort, Rasmus' opinion shouldn't terrify anyone since he's just one vote of many.
- gry 12y agoI'm of the mindset from 1995-2005, computer science and software engineering didn't exist while the web matured. PHP was major player in this time, as was Perl. Perl could have "won" just the same as ColdFusion, or VBScript. It took a decade for these web programming communities to introduce and/or build on ideas from 1958. Long before the web. PHP is better, however Rasmus' philosophy (while ok at the time) permeates PHP's design and it hurts. It hurts a lot.
- mgkimsal 12y ago> Perl could have "won" just the same as ColdFusion, or VBScript. Perl was far more widespread early on (96-99) than PHP was, but it was quite painful to deal with compared to PHP. PHP made web stuff dead simple, and that's why it 'won'. CF and VBS never really stood a chance because of the extra costs involved. iHTML, HTML/OS and others were all vying for a foot in the door at this stage, but all were second-run players charging money for something that 99% of hosts were never going to pay for, and therefore devs wouldn't get exposed to those tools.
- mercurial 12y agoThe funny thing is, despite being originally inferior in everything but simplicity compared to Perl, PHP has added feature upon feature (usually poorly thought-tout) over the years, and nowadays looks like a poorly-designed Perl with a terrible standard library.
- jacquesm 12y agoAnd an absolutely enormous installed base as well as a huge amount of code available for use. It's funny how it succeeded so well in spite of being a fairly crappy language.
- Gurkenmaster 12y agoThis is detrimental to JIT implementations of languages.
- fndrplayer13 12y agoI think this is pretty reasonable depending on how severe the issue is. You should have some monitoring and alerting on this. If this is happening once a month under extreme circumstances, its probably safe to let things continue like that with minimal investigation. But these are typically issues that will hurt you when scale starts to matter. I've personally experienced that. Ignore an issue that you know is important, but seems like it can wait relating to these kind of leaks, and a few months later you're in panic mode trying to hotpatch.