Hi
We took our Servoy app TrackIT productive with Servoy 4.1 with some testing before, but now as it’s productive the problems arise.
When the client starts the app and scrolls just 2 or 3 pages down, the client app dies and the Servoy Application Server dies as well. Sometimes I get an error window, sometimes I get an empty error window and in rare cases I get the error window shown in the attachement (attachment client crash).
When I manually restart the app server, I get Invalid database server command line (attachment app server startup). The app server starts anyway, but does not ordinarily start as a service any more when rebooting the server. I first have to manually restart the app server via Servoy Admin (in browser), then it’s starting as a service at reboot correctly.
Server: Mac OS X Server 10.5.6
Clients: Mac OS X 10.4.11 and 10.5.6
Servoy: Version 4.1
I hope anyone can help.
Best regards, Robert
BTW: I increased the memory for Servoy developer and clients.
Any errors in the server log?
What about exception stack traces in the client java console (if you enable show java console in java plugin settings)?
Hi Andrei
Can’t find any useful infos that seems to be related to that problem at the places you mentioned. But I found at least a partial solution to the reproducable crash when scrolling. I enhanced in Servoy Admin in menu Servoy Server Home two settings in
Memory/Performance Settings
servoy.initialClientHeap: 256
servoy.maxClientHeap: 1024
Later on, after having one more crash, I also removed the .servoy file in the folder and since then no crashes any more. Hopefully this stays so.
Could you please comment what’s about the message Invalid database server command line in the terminal when starting up the app server manually?
Thanks and regards, Robert
Andrei Costescu:
Any errors in the server log?
What about exception stack traces in the client java console (if you enable show java console in java plugin settings)?
That one sounds like a Sybase error message:
http://www.ianywhere.com/developer/product_manuals/sqlanywhere/0902/en/html/dberen9/00000293.htm
But I don’t see how sybase would try to start when starting app. server…
I don’t understand what you mean. But is anything wrong with the command I use in the terminal as shown in the terminal picture above? I assume the command is correct, is it?
Regards, Robert
Andrei Costescu:
That one sounds like a Sybase error message:
http://www.ianywhere.com/developer/product_manuals/sqlanywhere/0902/en/html/dberen9/00000293.htm
But I don’t see how sybase would try to start when starting app. server…
The command is correct. I was saying that sybase should not try to start when you start the app. server. - and the error you get is a sybase error complaining that it cannot start the database.
Did you modify servoy_server.sh - maybe add a line to start sybase automatically with the app. server?
No, this is the default Servoy 4.1 installation.
Is there anything in the server log when this happens?
What happens if you launch servoy_server.sh in foreground? Same message and server starts up ok? If so, pls. attach the servoy_server.sh file.
Is sybase already running when you start the server?
Do you only get this message when starting app. server after a crash like that or every time you start it manually?
Hi Andrei
Sorry for the delay, but we were moving our company (after more than 11 years) to a new location and therefor had to shutdown the operation for a short time. But now I looked at the problem described above again.
Andrei Costescu:
Is there anything in the server log when this happens?
What happens if you launch servoy_server.sh in foreground? Same message and server starts up ok? If so, pls. attach the servoy_server.sh file.
I was wrong when I said we use the original servoy_server.sh file. We added (as used with Sybase 9) the line as shown below (cd /Applications/Servoy/…). Without this stmt the Servoy app server won’t start! If I want the Servoy app server to start automatically after a Mac OS X server restart, I have to manually once to press the button “Restart Servoy Application Server” in Servoy admin (in the browser, menu Servoy Server Home). Something seems not quite right here…
#!/bin/sh
cd /Applications/Servoy/application_server; export DYLD_LIBRARY_PATH=/Applications/Servoy/application_server/sybase_db; /Applications/Servoy/application_server/sybase_db/dbsrv10 @/Applications/Servoy/application_server/sybase_db/sybase.config &
while true
…
Andrei Costescu:
Is sybase already running when you start the server?
Do you only get this message when starting app. server after a crash like that or every time you start it manually?
I get it every time I start it manually.
Best regards, Robert
I think I know what happens.
What your script does is start sybase in backgournd and then start application server.
This means that sybase might not load before application server starts… So when you restart the Max OS X server and this script runs the first time, the app. server might fail to load correctly because sybase is not yet ready. So probably when you restart app. server, sybase had enough time to fully start and app. server works as well.
Also once sybase is started, running the script manually will result in an error like the one you get because it cannot start twice… It is already started, and unless you stop it, you will get this message when trying to start it again.
So the solution is changing your script to use what we introduced for recent versions of developer in order to start sybase (available in 4.1) - dbspawn.
- dbsrv10 runs sybase on the current thread so script would not continue until sybase is closed if you wouldn’t run it in background- dbspawn will block script execution until sybase is initialized through dbsrv10, then allow it to run in backgound & allow script to continue
So the beginning of the script should look somthing like this:
#!/bin/sh
cd /Applications/Servoy/application_server; export DYLD_LIBRARY_PATH=/Applications/Servoy/application_server/sybase_db; /Applications/Servoy/application_server/sybase_db/dbspawn /Applications/Servoy/application_server/sybase_db/dbsrv10 @/Applications/Servoy/application_server/sybase_db/sybase.config
...
(This is similar to “nativeStartupLauncher” line in servoy.properties file of fresh 4.1 install)
I didn’t try the script but it should work like this - hope there’s no typo or smth in it
. Tell me if you can’t get it working.
Hi Andrei
I tried your proposed code. The findings are:
- There is nor error any more but running the script when a db server process (dbsrv10) is already running starts an additional dbspawn AND dbsrv process (with the user which is logged in). I don’t know how the 2 dbsrv behave and I assume this is not a desired situation.
- The script itself does not finish, it seems to wait for the quitting of the original dbsrv10 process? Stopping the shell script (with pressing ctrl-c in the Terminal on a Mac) leaves the (newly started) dbspawn and dbsrv10 process running.
- Trying to quit the processes manually in the Activity Monitor (which is UNIX spoken kill -15) doesn’t work, force quit (kill -9) would of course.
So there is still a piece (of code) missing to make the servoy_server.sh script work properly for this situation. Any ideas?
Regards, Robert
Hi Andrei
I forgot to mention that my above feedback is for your proposed command without running it in background, i. e.
cd /Applications/Servoy/application_server; export DYLD_LIBRARY_PATH=/Applications/Servoy/application_server/sybase_db; /Applications/Servoy/application_server/sybase_db/dbspawn /Applications/Servoy/application_server/sybase_db/dbsrv10 @/Applications/Servoy/application_server/sybase_db/sybase.config
If I run it the Sybase db in background, i. e.
cd /Applications/Servoy/application_server; export DYLD_LIBRARY_PATH=/Applications/Servoy/application_server/sybase_db; /Applications/Servoy/application_server/sybase_db/dbspawn /Applications/Servoy/application_server/sybase_db/dbsrv10 @/Applications/Servoy/application_server/sybase_db/sybase.config &
(The ampersand is the difference)
Running this I get the following message in the Terminal:
SkyServer:~ admin$ SQL Anywhere Start Server In Background Utility Version 10.0.1.3419
DBSPAWN ERROR: -81
Invalid database server command line
Regards, Robert
Here are a few useful scripts that I tried on Mac and they are working.
- 2 scripts are for starting/stopping sybase (you can look at these to build your own scripts as well)
- 1 script starts sybase & app server, if sybase is already started starts only app server and gives a message like “sybase already started”
- 1 script starts sybase & app server, if sybase is already started starts only app server and gives a message like “sybase already started”, and then if you shut down app server nicely (from servoy-admin page) it will stop sybase as well
All 4 of these scripts should reside in “[your servoy install dir]/application_server/”.
There should be no starting of multiple sybase instances and other problems you mentioned as long as you only use only one install and start sybase only from that install and like it is done in these scripts…
useful_mac_app_server_scripts.zip (1.75 KB)
Btw, in “servoy_server_with_sybase_start_stop.sh” and “stop_sybase.sh” you should replace “dba” and “sql” with your user/password.