|
Re: Tomcat and Apache Living Together, Mass Hysteria
|
Posted: Nov 5, 2002 10:15 PM
|
|
> You don't give enough diagnostics to go on here: Any of > 10,000 things could be wrong, everything from whether you > have a memory (heap or stack) leak to whether your JDBC > bridge is working correctly. > At least we've narrowed it down to 10,000 possibilities.
> I have run sites using this combination of technology > under extreme loads (millions of page-reads a day) over > many months without problems, but I have also had this > same combination blow in a day, usually because of > database issues. Check that your transactions are not the > problem (do you vacuum?) Since I don't know the volatility > of your data, I just can't say more. > OK. That's the kind of real-world experience I was interested in hearing about. I suspected I'm doing something wrong somewhere, because my problems usually turn out to be my fault. But since I didn't pay for any of these products I can't call up a vendor and ask for advice. I have been vacuuming nightly (my database, not my house), unless cron wasn't able to find vacuumdb. I just looked at my crontab entry and realized I had forgotten to give the full pathname of vacuumdb. So maybe I wasn't vacuuming. I didn't see any email message complaints from cron all this time, though. My friend Peter Kellner recommended I use Postgres, and told me to vacuum. He'd fall off his bicycle if it turned out I wasn't.
> Similarly your Linux 2.2 is pretty old; there were memory > issues with that kernel, and compatibility issues with > certain hardware. 2.4 might do better, maybe not. Some of > my early JSP/Tomcat apps, running on one of the first > releases of tomcat, were very stable under 2.2. Without > knowing your code, it's impossible to say, but I can say > that 2.2 had some VM issues, and it had some SMP issues. > Ditto for your Tomcat 3.3a ... if you had better > diagnostics of what is actually causing your app to fail, > you might find some corresponding issues in the bug > reports for the components. > I have reason to suspect the VM, because one of the other dumb things I do is repeatedly run a java app to build each page on the website from a makefile. It has been on my list forever to switch that to ANT, but I haven't done it yet. Thus, I create a new java process to pump out each page on the site when I do a full build, and every couple thousand of those java processes crashes. I don't remember the output, but I'll pay attention next time. I'll start a build and within a couple hours I should have an example of the crash, which output I will post.
I chose 3.3a, because several people told me it was very stable and that the then new 4.x line was not. If not 3.3a, then what?
> if you had better > diagnostics of what is actually causing your app to fail, > you might find some corresponding issues in the bug > reports for the components. > I'm not sure how to get diagnostics of my problem, exactly.
> Also you can have problems in allocating and reclaiming > objects: Do you pool objects or create them? What does > the JVM profiling say? Could you be keeling over from > null pointers or software proceeding along even when it > did not actually allocate some object? Do you check > result codes? > I use Jive forums, which does database connection pooling. I heavily hacked the Jive JSPs and made a few minor enhancements and bug fixes to the Jive API, but most of it I did not write and am not familiar with.
> I had one high-traffic portal app where peak-hour activity > was such the gc never got a chance to run; we eventually > had to force gc calls (which slowed the system, but slowed > slightly is far better than fail completely) > I don't have that much traffic. I get fewer than 2 million hits a month, and most of that is going to Apache, not Tomcat.
> I hope you begin to grasp the complexity of your question: > Those of us who do this work make a pretty decent hourly > wage for doing exactly what you troll for free ;) > My problem is I don't know how to analyze the problem. It doesn't happen consistently, and when it does happen I don't know how to tell what happened. What I'm really trolling for is if there's something obvious about the VM I'm using or version of something that has a reputation of being unrealiable. Short of that, I guess I need some advice as to how to analyze the problem.
> But to answer your basic question: Yes, > Tomcat+Apache+PostgreSQL are used in production systems > all over the world and they are, themselves, really very > reliable and trustworthy. /But/ do keep in mind that > Tomcat is a *reference* implementation, so it is not the > fastest nor the most memory efficient. > I currently no complaints about performance. As I said, most of the load is being taken up by Apache, which has only started acting strange twice in the past year, both times right after Tomcat went away. That I can live with. Linux and Postgres have never crashed once. It's quite amazing, really. But it shows that at least some open source apps are incredibly robust and stable. Apache seems fine except very occasionally it doesn't gracefully handle when Tomcat crashes. My problem is Tomcat.
|
|