Every now and then, our Xojo-written middleware instances will start reporting errors when connecting to the PostgreSQL server, usually because a query longer than, say 20 characters gets truncated. (I don’t know the exact length.) Once it happens, every connection from that instance exhibits that behavior and the only solution is to restart the instance.
Note that the instance, gets and handles requests from the GUI client in threads. Each thread gets and holds a new connection to the database until it’s finished, at which point the connection is closed.
Can you switch on logging and trace the SQLs to feed William with more information? You probably know that Postgres supports dynamic tracing, that might help you too.
i an test enviroment
i would try it with other postgresql version or may updated.
also test without thread and just simulation class that just use methods.
put the sql query before the where part into a string for loggin.
was postgresql server also rebooted?
is there a router between that need a reboot?
just to be sure its xojo,thread,hardware(router),server,database issue.
running at different pc to exclude this device.
maybe create a test app that run 24/7 to find the reason.
…
also check/log this Runtime. properties
GUI returns a syntax error, and the corresponding server-side logs show the query as truncated.
We first noticed this years ago with PSQL 9, then on 10, and today on 11. We have included defensive code to test for this periodically and reboot the instance when it happens, so it might be more frequent than we think. We do know that it’s not a server issue.
These are simple queries that are reused, i.e., not formed on the fly, usually through prepared statements.
For example, something like:
SELECT
id,
tag_name,
procedure_code,
revenue_code,
billing_provider_taxonomy_code,
site_of_care_provider_taxonomy_code,
any_provider_taxonomy_code,
billing_provider_state,
site_of_care_provider_state,
any_provider_state,
type_of_bill
FROM g.claim_tag_config
ORDER BY tag_name ASC
This one resulted in a “syntax error near ORDER BY” this morning. But this query is using during login and runs without issue dozens of times a day, at least.
Not sure about the Xojo internals. Internal connection pools, caches, machine states, or whatever retaining some broken state. Connection factory (new) inheriting a bugged condition afterwards, something like that.