3

My server setup is php7.0-fpm and nginx with symfony running on top.

I am just using a raw pdo connection

$conn = $this->get('database_connection');
$results = $conn->fetchAll("SELECT * FROM myTable");

One of my SQL queries is taking a really long time while also bringing down the site during that time.

I imagine there's some configuration going on that I need to change but I'm a bit of sys-admin/ops beginner.

I tried adding to my php.ini the

 default_socket_timeout = 3  

I tried adding=>

options:
     timeout: 3   

in my symfony config.yml.

Neither worked!

Is there another way of setting the timeout? Or is there some other thing going wrong?

Dr. Chocolate
  • 2,043
  • 4
  • 25
  • 45

0 Answers0