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

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

How to configure Neo4j logging settings in ThingWorx?

chrish
12-Amethyst

How to configure Neo4j logging settings in ThingWorx?

My ThingWorx server is growing Neo4j log files almost exponentially. In normal

installs

I can change configuration and control log retention, etc in neo4j.properties and cneo4j-wrapper.conf but neither appears to be available in ThingWorx installation.  Where is this configured?

10 REPLIES 10
Aanjan
12-Amethyst
(To:chrish)

Christopher, unfortunately the Neo4j log settings are not exposed in the platform. The only logging settings you can control per se, is the ThingWorx logging itself - Subsystems -> LoggingSubsystem has settings for max log size and retention time.

chrish
12-Amethyst
(To:chrish)

Ok. I went into Subsystems -> LoggingSubsystem and my install is configured max log size of 100000KB (100MB) according to Composer. This is the default.  Why then is my Neo logs growing to over 100GB in the ThingworxStorage/database/data directory??  How can I prevent Neo logs from generating 100's of GB of log files and overwhelming the storage on the server?

Aanjan
12-Amethyst
(To:chrish)

Christopher, that's the ThingWorx logs - if you go into ThingworxStorage\logs, 100mb would be the maximum size of a log file before it gets pushed into archive. Regarding the neo logs, those are the nioneo_logical logs, right? Do you have anything writing values into streams very frequently?

chrish
12-Amethyst
(To:Aanjan)

Yes. Data Tables and Streams. Both are stored in Neo. This is the basis of my original question.

I have same issue. I tried the purging of my streams on nightly basis. Still in ThingworxBackupStorage I have lot of files nioneo_logical.log.* Is it safe to delete them?

Varathan, although you can delete them, that is not the recommended way. These nioneo logical logs are the backup logs made by neo4j to restore its database if it crashed. What you can do is change the duration the logs are retained. Here's an article on managing retention of neo4j logs.

Thanks. I added the platform-settings.json. Set the DatabaseLogRetentionPolicy to 4 days. I noticed that it freed up some space (about 1.5%). However in /ThingworxStorage/database/data I see nioneo_logical.log.* as old as 7 days. I did restart the tomcat. Is there anything I am missing?

That should be it. It should've ran another clean up by now, so has there been a change in disk space? You can set it to as low as 1 day.

It did not clean the old files. I am manually deleting them. Thanks.

chrish
12-Amethyst
(To:chrish)

Once I implemented platform-settings.json with PTC support's help; my logs started cleaning themselves up better.

Announcements


Top Tags