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

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

Tomcat Restart

TanmeyTWX
17-Peridot

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!

20 REPLIES 20
jpenney
2-Explorer
(To:TanmeyTWX)

Hi Tarun,

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


James

Cryptosoft Ltd

TanmeyTWX
17-Peridot
(To:jpenney)

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"

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

jpenney
2-Explorer
(To:TanmeyTWX)

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?

TanmeyTWX
17-Peridot
(To:jpenney)

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

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.

jpenney
2-Explorer
(To:TanmeyTWX)

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.

TanmeyTWX
17-Peridot
(To:jpenney)

Resources are good.

Its 16 gb RAM with 2.00 GHz (2 Processors)

jpenney
2-Explorer
(To:TanmeyTWX)

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.

TanmeyTWX
17-Peridot
(To:jpenney)

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

jpenney
2-Explorer
(To:TanmeyTWX)

What database provider are you using for the ThingWorx service?

TanmeyTWX
17-Peridot
(To:jpenney)

It's Microsoft SQL

Aanjan
12-Amethyst
(To:TanmeyTWX)

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.

TanmeyTWX
17-Peridot
(To:Aanjan)

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

qn
12-Amethyst
12-Amethyst
(To:TanmeyTWX)

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.

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.

qn
12-Amethyst
12-Amethyst
(To:jlebourhis1)

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.

jlebourhis1
1-Visitor
(To:qn)

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

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

qn
12-Amethyst
12-Amethyst
(To:jlebourhis1)

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

jlebourhis1
1-Visitor
(To:qn)

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


Top Tags