Monday, January 13, 2014

WxService Stops Responding After Approx 17 Hours

I noticed recently that WxService would stop responding after a WxMonitor client was connected for about 17 hours (or half that with two WxMonitor clients, etc.). It turns out that StAX XMLInputFactory cannot create more than 64000 readers in JDK 1.7.0_45. In other words, WxService can only respond to 64,000 update requests until the XML parser stops responding. At one request per second, a single WxMonitor makes about that many requests in about 17 hours. Fortunately, there is a work-around that should hold us until Oracle produces a fix for this problem.

Using Notepad or other simple text editor, create a a file containing the following text:
#Hack for JAXP00010001 error.
and save it as C:Program Files/Java/jre7/lib/ (that is, place the file in $JAVA_HOME/jre/lib).

I will publish an update when this is no longer a problem.

Update: The latest WxService includes a code change that uses a different thread pool implementation that seems more compatible with JAX-WS. By "more compatible", I mean "the one it uses internally by default". There were some features that I liked with the one I had been using, but locking up wasn't one of them, so there you go. If you're experiencing lockups, download the latest version

No comments :

Post a Comment