Download | Wiki

Graceful acceptance of appsettings.json changes


I’ve noticed PTF is crashing whenever I modify the appsettings.json file, while it’s actively running. When it does this…PTF does reinitialize itself, but you wind up losing a solid 60 seconds before it actually triggers the updates to Profit Trailer that you intended. 60 seconds in crypto can be a long time, when it comes to trying to make a timely entry into (or exit out of) a position.

Unfortunately, my strategy requires I often update the appsettings.json (based on fluctuating BTC market conditions and other factors I measure against external to PTF).

Is there a way PTF can be patched so that it gracefully accepts a change to the appsettings.json and immediately triggers the process for updating the PT API without it crashing, waiting 30 seconds, initiating another 20 seconds, and then finally processing the PT API updates after that?

The way I see it, if it didn’t crash…the changes made to appsettings.json would apply to PT API within 10 seconds. That would be much more likely to make the desired entry/exit.

Here is a screenshot of the crash that occurs…


Just checking back on this one, as it’s been 10 days. Can I put this in a different section of the forum or would I be better off posting this in a specific Discord somewhere? Thanks.


Hi, sorry about the delay. The quickest response would actually now be on the PT discord, and the feeder channel.

Regarding this, this is actually an ungraceful shutdown. I could work on hiding the error, but the delay would still be there as feeder restarts on a config change by design.

I’ll see what happens when we do gracefully shutdown, but can’t promise that it will speed it up that much.


Is there a way, you could suggest, that I can run a command to gracefully shutdown and reinitialize PT Feeder myself? Perhaps via cmd or some other readily available method?


Unfortunately not. The error on shutdown is internal to the app so will happen whichever way to shutdown.