2

I'm having issues with a large number of conncurrent connections to an Amazon RDS database using propel as the ORM with PHP. The application runs fine during load testing with 20 to 50 connections open at a time, then seems to hit a wall, mushrooms up to maximum connections almost immediately, and everything dies.

I believe Propel is using mysql_pconnect, but I can't find where it designates that, or a simple way to turn it off. I may be chasing a red herring here, but I'm stumped, and there are enough comments on the net regarding pconnect causing problems with too many connections that I thought it would be worth a shot to remove it.

Anyone know how to do this? I have been searching using various phrases, can't seem to find anything.

j0k
  • 22,600
  • 28
  • 79
  • 90
CargoMeister
  • 4,199
  • 6
  • 27
  • 44
  • Which version of Propel are you using? – j0k Nov 15 '12 at 08:27
  • We are using version 1.6 – CargoMeister Nov 15 '12 at 18:30
  • 1
    I don't think Propel use persistent connection by default, at least, looking [at the code](https://github.com/propelorm/Propel/blob/master/runtime/lib/connection/PropelPDO.php#L132-158) it uses info from the config file. And [don't define](https://github.com/propelorm/Propel/blob/master/runtime/lib/Propel.php#L659) the persistent connection in PDO. – j0k Nov 15 '12 at 18:36
  • I can't see what you're referring to in there. Generally, it's mysql_pconnect for persistent connections, and mysql_connect for non-persistent connections. Unless propel is using a custom connector? That may be why I can't find it in the code. – CargoMeister Nov 15 '12 at 18:46
  • No it uses PDO, it doesn't use mysql_connect neither mysql_pconnect since version 1.3 ... – j0k Nov 15 '12 at 18:52

1 Answers1

0

As it turns out, the error was being caused by the RDS redo log. There is only one size for all RDS instance sizes. On the larger instances sizes, it's possible to fill the redo log and come back to the beginning before the data is written out to the database. At this point it does the 'furiously flushing' thing to get caught up, does not process any new requests, and they pile up like crazy. This eventually caused our app to crash. More, smaller RDS servers fixed the issue, though not very happy with Amazon over this. They need to be able to change the size of the redo logs.

CargoMeister
  • 4,199
  • 6
  • 27
  • 44