Database memory issue

  1. 8 weeks ago

    Hi all,

    Currently we are using Xojo as an API for our front end client. We are seeing issues with our Postgres database memory, over time the memory usage from the connection related to the API will kill the PSQL box as it runs out of available memory. The time can be dependant on the amount of users that are accessing the website. In order to get the memory back we have to restart the API. As soon as this is restarted the memory is returned.

    We have some other worker apps (Xojo Console Apps) that connect to the same DB and they are not increasing the memory like the API does. These worker apps check the database every second, the only differences between the two are the API is using `Prepared Statements` and the workers are not.

    Has anyone experienced any issues with memory increase over time using `Prepared Statements`? If so are the any suggestions to clear this memory.

    Xojo 2019 r3.1 is being used to build currently

  2. Kem T

    Feb 12 Pre-Release Testers, Xojo Pro, XDC Speakers, MVP Connecticut

    Currently, Prepared Statements are not being released and build up over time. The only way to handle it is to disconnect/reconnect, clearing all prepared statements, or cache and re-use them to reduce the build-up.

    We solved the problem accidentally. Our middleware creates a new, temporary connection to the db on each new action, but this might not be practical in all situations.

    Feedback Case #41633

  3. Thank you for the swift reply on this :)

    @Kem T Currently, Prepared Statements are not being released and build up over time. The only way to handle it is to disconnect/reconnect, clearing all prepared statements, or cache and re-use them to reduce the build-up.

    We solved the problem accidentally. Our middleware creates a new, temporary connection to the db on each new action, but this might not be practical in all situations.

    Feedback Case #41633

  4. Joost R

    Feb 12 Pre-Release Testers, Xojo Pro The Netherlands
    Edited 8 weeks ago

    @Simon G Xojo 2019 r3.1 is being used to build currently

    An old problem copied over to API 2.0 .

  5. Norman P

    Feb 12 Pre-Release Testers, Xojo Pro outside enjoying the fresh air

    @Joost R An old problem copied over to API 2.0 .

    No copy
    API 2.0 is a new Xojo API on top of the same old C++ framework code and very little new framework code from what I can tell
    So old problems persist if they are in the C++ layer

  6. Joost R

    Feb 12 Pre-Release Testers, Xojo Pro The Netherlands

    @Norman P No copy

    Right, I've chosen the wrong word, and understand what you explain to us Norman.
    But I keep thinking that It's a pity that so long-known problems are not yet solved with this movement.
    I am still on 1.0, waiting for the real need to jump over to the new API. W.E. 2.0 I guess / hope.

or Sign Up to reply!