I have come across a scenerio multiple times,where my application get stuck or stops responding and restarting Apache Tomcat resolves that.
-Why we need to restart tomcat always to overcome this issue?
-What are the possible reasons of application failure or zero response while in a production environment?
-Are there any resolutions for this problem and to avoid force restart of Tomcat server in a production environment?
Please provide your valuable feedback/Inputs.
Thanks in advance!
I don't have anything deployed on Tomcat Apache except ThingWorx.And I don't see exceptions in catalina logs but one.i.e
"java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: com.thingworx.types.InfoTable"
No - you shouldn't need to change anything. I have actually seen something similar myself, though - but not related to that exception you mention.
I found that if the box that was running the ThingWorx service was under heavy load, a lot of ThingWorx pages would 'freeze' (saving something takes 5 minutes+). In my case, I was also running a PostgreSQL database which was consistently using 75% CPU. Once I moved that service to another box, the ThingWorx application was much happier. I don't believe the issue was related to ThingWorx itself, just a limitation of my small virtual instance.
Do you have any other services running on your ThingWorx server that could be using a lot of resource?
In my case,I login to server through Remote desktop assistance and Thingworx is installed on that server and no other applications are being used there.
Sorry - by 'box' I mean the server that has the ThingWorx service installed.
Do you know the hardware specifications of your ThingWorx server? It sounds like it is running out of resources, in my opinion.
The Tomcat process could be hitting a ceiling. What are your Tomcat memory options set to? You could try increasing these to 512 initial and 1024 max and see if that helps.
In addition to James's question about hardware specifications, how many users and remote devices connect to your server? If many remote devices are connected, how frequently are the properties getting updated? Are there any file transfers or tunneling involved? Are there multiple timers firing scripts at specified times?
These are some of the points to go over if the server's performance deteriorates over time and a Tomcat restart fixes it.
Can you monitor the memory and the cpu usage of tomcat ? Are there some scripts which consume a lot of resources or which block other script ?
By the way, I wonder how ThingWork manages the concurrent threads.
I know it is a bit old but i wa wondering if you managed to do anything about your problem ?
I had the same problem and it was ALWAYS because I was loading too much data. For instance, if you fill an Infotable with 10 000 rows of data, Thingworx will just crash.
And this problem is even more present with the Neo4J version.
Do you give Tomcat more memory than the maximum memory of your machine/VM ? It's declared in "setenv.sh", "Xmx...". If the memory is allocated correctly, the processing will take time but ThingWorx won't crash.
We cannot use them in our case
Anyway, as we know where it comes from, we're not running into this problem anymore since we have implemented some pagination to avoid this (ideed, it is not usefull for end users to wait more than 10mn to have displayed data )
My answer to this thread was, at first, to give another piece of answer to Tarun Nayyar.
But thank you for your thoughts QD N, much appreciated