changed config for mysql lost connection on pserve
refactoed reservation