Connection to Server

I have a WiFi icon in my Selected Records/Total Records box.
I have a procedure that contains

If Info("ServerConnection") = 0
Message "This db is NOT connected to the server!"
Else
Message "This db is connected to a server."
EndIf

That procedure returns “The db is connected to a server.”
If I try to add a record, I get an error message stating “ERROR: Couldn not connect to server name Automation 21”
I check the server and yep, the server has stopped again.

Is there a better way to become aware that the server has quit?

Server Monitor in the Database Exchange can be modified to send you an email or text message if the server goes down - and as-is can relaunch it.

I did try Server Monitor and could not get it to reliably relaunch the server.

Maybe you could share your OS and Panorama build number with me, or any other info. So far it’s been very reliable for me on every OS or PanX update. I’m aware of others successfully using it too, so there may be something different about your configuration.

Just now I found my Panorama X Server stopped. ServerMonitor was idle in the background with the following error:

Field or Variable [fgResponse] does not exist.

macOS 11.4
Pano: 10.2.0 b16

fgResponse is defined as a FileGlobal in the .Initialize procedure and the file opens nothing else. So the error is curious.

Any chance that you’ve modified the .Initialize procedure?

Jim, When I was using ServerMonitor, I got the “Field or Variable [fgResponse] does not exist” error often.

I have not modified the .Initialize procedure.

I’m baffled by that but have made a few enhancements to it today as I ran it while trying to see the error. So far no luck there whether it’s the active file or not.

I opened up a few of my shared files and did not receive any particular notice. I then later did notice that I did not have the WiFi icon. I then checked and the server had stopped. I restarted it. I then used the Connect to Server menu item in the File menu. It did connect at that time. It also though presented me with an error.

Panorama Server needs an In Your Face message or notice that a shared file is being opened without a successful connection to the server. While yes, it would be nice if the server would stop shutting down as often as it does, without a notice when a user opens a shared file that there is no successful connection being made, a lot of data can be lost while the connection is down.

I had PanX server crashes about every two months, until August 3, 2021. I have not had a crash since then.
BTW, Jim Cook shared a database that will automatically restart the server if it crashes. Available in DatabaseExchange, ServerMonitor.

I’ll be posting a minor update in the next day or so.

I thought Rob’s suggestion of a prominent notice when opening a DB that the DB has not connected to the server was a good idea. So I created a large form that is included in the Database Options/Initial Windows list that says the DB is checking on the server. The .Initialization code closes that window, but will not run if the server connection is not established, so the window does not go away.

I agree. I get a notification from Notifications that it is opening a database on the server, but it doesn’t say anything about being successful. This along with the disappearing WiFi icon makes confidence lower. I know you can’t work on this now, but it’s quite necessary.

btw: Clients immediately complain about notifications. They want them shut off ASAP. I too find them bothersome when the info is unnecessary, like “Already synchronized with blah blah server”. Critical server error messages should come from Panorama, if possible.

Some additional context on Tom’s post – his organization is heavily using the server on a daily basis, probably more than 10x more than all other users combined. They regularly have a dozen users connected. They were early beta testers and started using it nearly a year before anyone else, and went through a lot of problems in early versions. Fortunately Tom and his users were very patient and Tom was very communicative and cooperative as far as running tests, collecting logs, etc. Thanks to their help, the process went a lot smoother for the rest of you.

This is a known bug that has been mentioned on the forum before.

I’ve got to say here that Tom’s usage is atypical and from my perspective only offers a small bit of comfort. His usage says that his code has been debugged within Panorama’s code, and that he has done some stress testing.

But as most users won’t be doing that stress testing, that is small comfort. Nice but not all that useful.

When my code can consistently cause the server to crash, that is more problematic as I can do that with multiple pieces of code. Thus my failures are more likely to cause users problems than Tom’s successes. That fact that Tom can have 10,000 users do X with no failures only says that X works and that the server can handle 10,000 users. What about A,B,C,D, etc?

When I was attempting to demonstrate to another Admin how the Disconnect from Server / Connect to Server worked, I found that after selecting Disconnect from Server, that the Connect to Server did not then appear. Multiple attempts to use the Disconnect from Server resulted in no change to the File menu. But if I went to another window, then back to the File menu, the Connect to Server then displayed.

During one of these back and forth attempts to figure things out resulted in the “WaitForTask statement can not wait.”

I’ve reported this in the past. I’ve seen it several times when trying to Connect to Server.