App does not sleep, how to debug traffic?

ProjectId: cc33245f-e708-4e47-8e3f-c2f9fe23dac1 Hi, I have a springboot project deployed on railway, I have enableb App Sleeping for it, but it never sleeps. Looking at the Network dashboard I noticed that the app always receives and sends traffic from time to time, requests alternate between 2 and 0 kb. There is no health check enabled.  I used this command to debug the app locally sudo tcpdump -i any -nn port 8080 and verified that the app does not make requests in the background, nothing has been logged in more than half an hour.  Is there any way to check railway traffic logs?
No description
Solution:
Is there any way to check railway traffic logs?
there isnt, yet, railway does want to expose these logs to the user at some point, but its far from top priority your app can be prevented from sleeping by something as simple as an ntp update, the java sdk reporting telemetry, or a bot periodically calling the service, there is admitted not a lot you can do to view what is truly going on...
Jump to solution
7 Replies
Percy
Percy11mo ago
Project ID: cc33245f-e708-4e47-8e3f-c2f9fe23dac1
Solution
Brody
Brody11mo ago
Is there any way to check railway traffic logs?
there isnt, yet, railway does want to expose these logs to the user at some point, but its far from top priority your app can be prevented from sleeping by something as simple as an ntp update, the java sdk reporting telemetry, or a bot periodically calling the service, there is admitted not a lot you can do to view what is truly going on
Mafiaboss
Mafiaboss11mo ago
@IsraelRodrigues i have exactly same problem. Have you managed to figure out?
macwilko
macwilko11mo ago
I think app sleeping makes more sense for internal (private) infra. Think maybe, a service endpoint you might call periodically (resize an image, compute some AI meta data etc), rather than your web process. As brody mentioned, any random bot, web crawler, ping from something, will wake your app up. You might find adding Cloudflare will help reduce the pings from bad bots, theres plenty of legitimate bots out there that will still wake your app up.
Brody
Brody11mo ago
I think app sleeping makes more sense for internal (private) infra
while i agree with this, id still like to note that it is not possible to wake a service via the private network.. yet
macwilko
macwilko11mo ago
ouch, didn't know that. thanks brody.
Mafiaboss
Mafiaboss11mo ago
well if you are using java native graalvm image then you spring boot spins almost instantly so making it sleep to reduce cost is really beneficial
Want results from more Discord servers?
Add your server