Re: how proxy handles Lua memory
In case anyone stumbles upon this post in the future, I figured out the answer. I put some test print lines in my script and watched the logs, and here is what I figured out (although someone who knows better might want to confirm this):
On every connect/reconnect, the Lua script mysql-proxy points to is reloaded. As the FAQ states, it either runs the cashed copy, or gets the current file if it is different. On every connection, the entire script is executed again. However, any scripts refrenced with a 'Require' statement are executed when the proxy starts and remain in memory in that state. This means you can put globals and helper functions in separate scripts to reduce processing time. This also means if you change one of these other scripts, you will have to restart mysql-proxy for those changes to take effect.
I hope that helps someone.
Subject
Views
Written By
Posted
3329
October 19, 2012 09:45AM
Re: how proxy handles Lua memory
2069
October 25, 2012 06:10AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.