Chirpstack gateway bridge resending of data when chirpstack-network-server is not alive for log time

Hi brocaar,
I am using the latest released chiprstack binaries in my arm platform. While field testing was going on somehow chirpstack-network-serve got killed. So, chirpstack-gateway-bridge was retaining all the messages for which it couldnt recieve PUBACK. In all toml files qos has been set to 2 and cleansession as false. After 8 hours of chiprstack-network-server disconnection, I tried to rerun chirpstack-network-server and chirpstack-gateway-bridge once recognise the chirpstack-network-server connection, it tries to send all the retained messages which are nearly 1000 data packets. In this case, not all the retained message has been received by chirpstack-network-server. Instead i am getting so many connection errors continuously after reconnection. Could u please tell me what im doing wrong?

Errors noticed:

finished unary call with code Internal ctx_id=dbd3d76e-30c6-4206-af15-f843557451eb error=“rpc error: code = Internal desc = handle uplink data error: get device error: select error: pq: sorry, too many clients already” grpc.code=Internal grpc.method=HandleUplinkData grpc.request.deadline=“2020-07-09T03:56:38Z” grpc.service=as.ApplicationServerService grpc.start_time=“2020-07-09T03:56:37Z” grpc.time_ms=805.293 peer.address=“” span.kind=server system=grpc

ERRO[52629] integration/multi: integration error ctx_id=2cb21c3d-9566-499e-956e-c1fa588c2f55 error=“get gateways for ids error: select error: pq: remaining connection slots are reserved for non-replication superuser connections” integration="*mqtt.Integration"

FATAL: remaining connection slots are reserved for non-replication superuser connections

FATAL: sorry, too many clients already