cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Tomcat Restart

Highlighted
Aquamarine

Tomcat Restart

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!

Tags (1)
20 REPLIES 20
Highlighted

Re: Tomcat Restart

Hi Tarun,

It could be a whole host of different things - Do you see any exceptions in the catalina logs?


James

Cryptosoft Ltd

Highlighted

Re: Tomcat Restart

Hi James,

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"

Highlighted

Re: Tomcat Restart

Do I need to alter any Tomcat configurations to keep it alive all the time and to avoid force restart?

Highlighted

Re: Tomcat Restart

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?

Highlighted

Re: Tomcat Restart

Sorry I didn't get what do you mean by "Box"?

Highlighted

Re: Tomcat Restart

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.

Highlighted

Re: Tomcat Restart

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.

Highlighted

Re: Tomcat Restart

Resources are good.

Its 16 gb RAM with 2.00 GHz (2 Processors)

Highlighted

Re: Tomcat Restart

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.

Highlighted

Re: Tomcat Restart

I have already tried that and set it to 512 mb Min and 6gb max but no luck

Highlighted

Re: Tomcat Restart

What database provider are you using for the ThingWorx service?

Highlighted

Re: Tomcat Restart

It's Microsoft SQL

Highlighted

Re: Tomcat Restart

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.

Highlighted

Re: Tomcat Restart

Maximum 3 users can connect and login to access.And there is no tunelling or file transfers on it.

Highlighted

Re: Tomcat Restart

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.

Highlighted

Re: Tomcat Restart

Hello,

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.

Highlighted

Re: Tomcat Restart

Hi,

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.

Highlighted

Re: Tomcat Restart

no, that is what i thought at first...

But after some researches, it seems that Neo4J is causing troubles with big loads of data.

Highlighted

Re: Tomcat Restart

Maybe there's something you can try with Stream / ValueStream processor settings like Max Queue Size, Max Wait Time...

Highlighted

Re: Tomcat Restart

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

Announcements

Thingworx Navigate content has a new home! Click here to access the new Thingworx Navigate forum!