Hello,
When ALTER commands are used in our cloud program and are executed from a second transaction object, the connection to the database is disconnected from the first transaction object.
I have already tried to reproduce the problem in a genapp, but the database connection was not disconnected.
The source code and transaction objects are almost identical.
But I don't see the problem.
Does anyone have any idea why this might be?
Regards,
Jan Weerts
I'd like to share a few suggestions:
1) If this issue only exists in the Cloud App, it is important to understand the following connection differences between the PowerBuilder traditional C/S app and the PowerServer installable cloud app. In the installable cloud application, the database connection is made from PowerServer (not from the client), and the database connection is ended and returned to the connection pool when the transaction is completed. This database connection is called "short-lived connections". Refer to: https://docs.appeon.com/ps2022r2/Connection_differences.html
E.g.: if you change the password of a login in session, I suggest that you restart the application to make sure the database connection information is correct for all transaction objects. Otherwise, another transaction object may also use the old connection string to connect the database once needed. Alternatively, you can enable LongConnection.
2) Another possible reason for the Kill state is the database needs to be repaired. E.g.: https://stackoverflow.com/questions/40449982/cannot-continue-the-execution-because-the-session-is-in-the-kill-state-while-bu
3) It would be better if you could reproduce this issue, or provide the PowerServer Web API log (https://docs.appeon.com/ps2022r2/PowerServer_logs.html) that may contain more details about this database error.
Regards, Logan
Thanks for the comment.
Regarding the 3rd point you wrote.
I can reproduce the problem, but only with our PFC files, not with a newly created Genapp.
Hence the question about possible settings in the transaction object that disconnect the database connection.
And about your 2nd point the Database is not the Problem.
Regards Jan