The reason for this is, that for the zero-downtime-deploy the old and the new version run at the same time for up to two minutes while the routing tier makes sure new requests go to the new version while the old one finishes any pending requests.
To avoid running into connection errors with the free MySQLs Add-on you'd have to setup the rails connection pool to only open 1 connection max.
Your database.yml should look something like this for the production environment:
production:
adapter: mysql2
encoding: utf8
pool: 1
database: <%= "'#{ ENV['MYSQLS_DATABASE'] }'" %>
host: <%= "'#{ ENV['MYSQLS_HOSTNAME'] }'" %>
port: <%= ENV["MYSQLS_PORT"] %>
username: <%= "'#{ ENV['MYSQLS_USERNAME'] }'" %>
password: <%= "'#{ ENV['MYSQLS_PASSWORD'] }'" %>