added g variable to open/close RDS connection before + after requests
added g variable to open/close RDS connection before + after requests