Web app Crash and Can't Restart

Good day,

I have a web app that has been running well for a year, non-stop. Private page, very low traffic.

Suddenly it crashed with

admininterface.[12120]: segfault at bf5e4fec ip b70e1887 sp bf5e4ff0 error 6 in XojoConsoleFramework32.so[b6f24000+651000]

When trying to start it again it starts but internal timers don’t fire, the socket does not listen. Only app.open runs (I have a debug print there) and after that nothing.

A reboot might fix but I’d like to know if this can be fixed without a reboot.

Built with 2015r4.1, runs on Linux Debian 8 x86.

thanks!

SegFaults in web apps are usually due to running out of RAM or the system killing the app for running at high CPU for too long.

As far as not restarting, look in /tmp and see if there’s a file that matches the app identifier. If so, remove it and try launching again.

@Greg O’Lone thanks for the tip, but there is nothing related to this web app in /tmp.

Actually I tried stopping all other Xojo-based apps that were running (console) and clearing /tmp altogether, to no avail.

Any more ideas ?

thanks!

Have you tried launching the app from the command line to see if there are any errors?

Yes, I launch it from the command line anyway; it only seems to run through whatever is in app.open and stops.

This application makes use of IPC, could it be an issue? However, there are console apps that use the same IPC mechanism and have been running for since the system ever booted (up 426 days…) except when I stopped ALL Xojo built processes just to see if it has any effect on this web app…

If I reboot we’ll never know what it is, so I am sort of reluctant to reboot it :slight_smile:

Ah, well if it’s running app.open the most likely scenario is that the port you’ve selected is either already in use or that you’re not allowed to use it.

What’s the command you are using to launch it?

Hello Greg,

the port isn’t in use, and actually when it starts it does listen on the port (9000). Browser trying to open the page connects but waits forever for a response.

app.open calls some timers to start (which should print out debug lines), those do not seem to run.

seems like something more sinister here…
thanks!

Hello all,

Anyone has any idea why would a web app not start after a crash? Can it be the system uptime is too long ? :slight_smile:

[quote=351052:@Shant Khatcherian]Hello all,

Anyone has any idea why would a web app not start after a crash? Can it be the system uptime is too long ? :)[/quote]
It wouldn’t be that.

I’m still wondering what the full command is that you’re using to launch the app and what else is in your open event.

Usually this means that the app is caught in a tight loop or that it’s blocked in some way… for instance a connection attempt to a database that isn’t available.

Good day,

./admininterface.bin -S -ERR -INF -RAW
(those are arguments to let the app print out all three kinds of debugging I have built into it)

1: app.open calls a function to connect to an ipc socket… that works fine

2: calls a function reading some config from a sqlite database… seems ok

3: app.open should start a timer that fires every second and prints debug, but that doesn’t happen.

There should also be data received on IPC and printed out, sometimes it gets one and stops and sometimes none.

weird or what?

So have you put code in App.UnhandledException to write an error to the system log?

No i dont have that, just debug from each function as its called. Will add and rebuild then to add this one…
Shouldnt such an exception print anyway?

thanks

Perhaps you need to append " &" after the command to keep it running

[quote=351224:@Shant Khatcherian]No i dont have that, just debug from each function as its called. Will add and rebuild then to add this one…
Shouldnt such an exception print anyway?

thanks[/quote]
True. But in the case of a segfault, they may not make it to the System last log without a little help.