Blogging Roller
While rollerweblogger.org is down, I'll be blogging here

Home


Subscribe to "Blogging Roller" in Radio UserLand.

Click to see the XML version of this web page.

Click here to send an email to the editor of this weblog.
 

 

Sunday, June 30, 2002
 

rollerweblogger.org and the real Blogging Roller weblog is back and better than ever!

10:58:26 AM    


Friday, June 28, 2002
 

I should be up and running at Kattare.com in the next day or two.  So far, I am very, very happy with Kattare.  10:23:41 AM    


Wednesday, June 26, 2002
 
Low-cost Servlet ISPs and shared Java VMs
Servlet ISPs in my price range ($30/month or less) generally offer to host you on either a shared or a dedicated Java VM.  The dedicated Java VM is usually the more expensive option.  I'm here to tell you: spend the extra money and go with a dedicated Java VM.

After experiencing first-hand the instability of a shared JVM and hearing from my ISP that a shared JVM setup cannot offer the same stability as PHP or ASP, I wrote up some questions for the resin-interest mailing list.  Resin is the Servlet engine that my former ISP uses.  The responses convinced me that, in the Servlet ISP world, shared Java VMs should be considered harmful.  Here are my questions and for each my summary of the answers:

Question 1) Is the shared JVM solution an unworkable solution for a hosting service? Resin's classloader hierarchy should keep apps from interfering with each other and the webapp-reload capability should eliminate the need to restart the server when webapps get re-deployed.  Right?

Yes, generally Servlet engine classloaders should prevent webapps from interfering with each other.   However, if one user's app does really bad things (e.g. deadlock, infinite loop, etc.) the the whole JVM could become unresponsive.
Question 2) What would cause the JVM to crash all of the time? Unreleased resources such as DB connections? System properties that interfere with each other?

Even well behaved webapps can cause JVM crashes or lockups.  JVMs do still have some serious and fatal bugs and if a user's webapp tickles one of these JVM bugs, then your shared JVM will keep on crashing until that webapp is undeployed.

Question 3)  Other app servers that I have used will automatically restart a JVM if that fails or becomes non-responsive - can Resin do this? And if Resin can do it, then why can't my hosting service do it?

Resin will automatically restart a JVM that has crashed and Resin includes a ping mechanism to detect and restart JVMs that have become unresponsive.  This is great, but it does not always work.  For example, on UNIX an unresponsive JVM might become a zombie process, making it difficult to restart.  Another example, my former ISP claimed that ping did not always detect unresponsive JVMs.

In conclusion, if you want a low-cost Servlet ISP for your personal website, your Java-based weblogging software, or your small organization, you should pay the extra money and get yourself a dedicated JVM.  Also, try not to get an ISP that sucks. 11:32:41 PM    
New ISP
I've selected a new Servlet hosting ISP.  I'll post the details once Roller is up and running. 2:33:33 PM    
localBlog again
In case you missed my earlier post about localBlog, I will mention it again.  Jeremy has now added support for Velocity-based page templates.  Try it out and encourage him to continue development, we need a nice Java-based client-side blogger. 9:19:35 AM    


Tuesday, June 25, 2002
 
Roller load testing and Tomcat vs. Resin

CQHost accused Roller of "generating an exception/crash the JVM" and maybe they are right.  After all, ever since they shut me down around noon today, I don't think they have crashed once.  I told them that I am very interested in helping to find and fix this problem, but I have not heard back from them.  I assume they are just tired of dealing with me.  As you know I feel the same way about them.

I found it pretty hard to believe that Roller is the source of the CQHost crashes so I decided to test Roller under heavy load and see if I can make it crash or lock up my JVM.  I have a configuration at home that is very similar to the one at CQHost: Redhat 7.1 Linux, Sun JDK 1.4, and MySQL.  I downloaded JMeter and ran some tests with Roller running on Resin 2.1.1 and Roller running on Tomcat 4.0.4.

Hardware / Software Configuration
CPU: AMD Athlon 1600 (1.4ghz)
Memory: 296mb
OS: RedHat Linux 7.2
JVM: Sun Java 1.4.0
Database: MySQL
Other software: Struts, Velocity, Castor JDO

JMeter test plan:
Number of threads: 2
Loop count: 1000
Ramp-up time: 0

Test A: Roller on Resin 2.1.1 with the MM.MySQL JDBC driver and MM.MySQL connection pooling - no page caching.  Page load time averaged 2.8 seconds, there were no JVM crashes or lockups.

Test B: Roller on Tomcat 4.0.4 with MM.MySQL JDBC driver and DBCP connection pooling - no page caching. Page load time averaged 6.2 seconds, there were no JVM crashes or lockups.

What did I learn?  I learned that Roller I cannot make Roller crash or lockup a JVM under moderately heavy load - much greater load than I have ever gotten at CQHost.  I also learned that Resin is about twice as fast as Tomcat when rendering the very same Roller weblog page.

11:19:36 PM    
Local Blog

Jeremy Rayner has written a very nice and simple little Java-based client-side blogger called (for the moment) LocalBlog.  LocalBlog provides a simple little Swing-based interface for editing blog entries, generates both HTML and RSS for your blog, and uses FTP to copy your blog to the web server of your choice.  By using the tiny little JDBC-ready HSQL database to store blog entries and the ORO NetComponents FTP library, he has avoided writing a lot of code. I like that.  LocalBlog does not do page templates, blog calendars, and blogrolls yet, but it is a very nice start.

10:19:15 PM    
Tomcat vs. Resin: DataSource Setup

One limitation of Tomcat 4.0.X is JNDI DataSource setup.  With Tomcat 4.0.X you cannot use the javax.sql.ConnectionPoolDatasource implementation that came with your JDBC driver.  Instead you have to download the latest Jakarta Commons DBCP, Pool, and Collections jars (pre-release software) and use DBCP to do the pooling.  If you want to do this take a look at this email from the Tomcat-User mailing-list for some pointers.

With Resin, you can use the javax.sql.ConnectionPoolDatasource implementation that came with your JDBC driver. For example, I configured the MM.MySQL JDBC driver's connection pooling by adding the following (non-standard) stuff to Roller's web.xml deployment descriptor file:

<resource-ref>
  <res-ref-name>jdbc/rollerdb</res-ref-name>
  <res-type>javax.sql.ConnectionPoolDataSource</res-type>
  <init-param driver-name=
  "org.gjt.mm.mysql.jdbc2.optional.MysqlConnectionPoolDataSource"/>
  <init-param serverName="localhost"/>
  <init-param user="myUserName"/>
  <init-param password="myPassword"/>
  <init-param port="3306"/>
  <init-param databaseName="roller" />
</resource-ref>

If you don't like adding non-standard stuff to your web.xml, you can add the same stuff to your resin.conf file.

I don't know if this will be fixed in Tomcat 4.1 or not.

8:50:35 PM    

OK.  I pounded the Roller/Resin/WinXP combo for about an hour using JMeter, using 3 threads and a 1 second ramp-up time.  Roller ran flawlessly and Resin did not crash. 

5:43:23 PM    
It's not me, it's you
CQHost now says that Roller is crashing the JVM.  I told them that, if this is true, I am very interested in finding and fixing the problem.  I've been hammering Roller/Resin/WinXP with JMeter to see if I can make it crash.  I'll try Roller/Resin/Linux next. 1:08:31 PM    

CQHost is down again. I guess that JDK 1.4 upgrade didn't help. 9:54:47 AM    

CQHost is back now. They were down all day Sunday and they were down for over and hour three separate times yesterday.  During outage number three, I submitted this text in my trouble ticket:

Restart the server please. You need to figure out why the server is constantly crashing and fix it. If you are not willing to do this then you need to refund my money, this is getting ridiculous

They responded that they have now upgraded to JDK 1.4 and expect things to be stable for a while. If things are not stable, then they will move me to a stable server.  As they say in Missouri - show me.

I've got some emails out to some of the hosting services mentioned in the JavaLobby thread.  Also, I also have some responses to the questions I sent to the Resin mailing list.  I'll review this stuff in a post later on today.

7:02:17 AM    


Monday, June 24, 2002
 
This has gone on for far too long

I'm actively investigating alternatives to CQHost.  If you have any suggestions, please let me know. 

I have seen the Serlvet ISP list at Servlets.COM and I followed the recent JavaLobby thread on the same topic.  I will review the alternatives mentioned in that JavaLobby thread in a later post.  I'm really starting to wonder if $20/month is an impossible price-point.  Maybe the shared Java VM concept favored by the cheap ISPs is not a workable solution. 

CQHost says that shared JVM is not a workable solution and CQHost uses the latest version of the Resin Servlet engine.  For the sake of Roller and Java in general, I'm interested in understanding this problem, so I wrote the following to the Resin mailing list:    

I'm using a hosting service who shall remain nameless (at least in this email).  This hosting service provides Resin 2.1.1 in a Java VM that is shared by multiple users.

This hosting service cannot keep Resin running for more than a day at a time (they had three outages today).  When asked why they cannot keep the server up, they responded that "we cannot offer the same stability with java like PHP or ASP due to the limitations of a shared JVM setup."  

I really want to know if this is true.  I've been using Resin, Tomcat, and other Java app servers for quite some time and I cannot believe that my hosting service is telling the truth.  Am I totally naive?

Please tell me:

1) Is the shared JVM solution an unworkable solution for a hosting service? Resin's classloader hierarchy should keep apps from interfering with each other and the app-reload capability should eliminate the need to restart the server when apps get re-deployed.  Right?

2) What would cause the JVM to crash all of the time? Unreleased resources such as DB connections? System properties that interfere with each other?


3)  Other app servers that I have used will automatically restart a JVM if that fails or becomes non-responsive - can Resin do this? And if Resin can do it, then why can't my hosting service do it?

10:17:55 PM    

CQHost came back for a while and now they are down again - the 3rd outage that I am aware of today. 9:39:06 PM    

CQHost is down again - the 2nd outage today.  They added a status page at: http://peregrine.cqhost.net/caucho-status which shows everything as working fine, but if you try to run a JSP page on any of those sites right now you will find that they are all down.

 

7:25:21 PM    

Blogging Roller is back after a still unexplained 12 hour long CQHost outage.

3:44:18 PM    

CQHost is still down.  They will not respond to trouble tickets or requests for status.

11:03:16 AM    

CQHost is down again. 7:06:50 AM    


Sunday, June 23, 2002
 

Wow.  I was really starting to wonder if CQHost was going to come back or not.  Now they are back and Blogging Roller is back as well.

9:11:05 PM    

CQHost is still down, and I mean totally down. I cannot even reach cqhost.com! 3:14:40 PM    

CQHost is down again.

9:21:17 AM    


Friday, June 21, 2002
 

CQHost has gotten Resin back up and running now, so Blogging Roller is back again.

8:09:19 AM    



Click here to visit the Radio UserLand website. © Copyright 2002 David M Johnson.
Last update: 8/20/2002; 12:07:23 AM.
This theme is based on the SoundWaves (blue) Manila theme.
August 2002
Sun Mon Tue Wed Thu Fri Sat
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
Jun   Sep


What is this webpage?

This is my old weblog. I only blog here when my real weblog Blogging Roller is experiencing technical difficulties.