3

I am running mongodb in docker container and i want to increase the timeout value from 30 sec to like 2 min but i dont know where to change. As my request is taking more time and causing below error:

{"code":500,"message":"Error: Maximum execution time of 30 seconds exceeded"}

i tried to put value in config.yml as shown below:

doctrine_mongodb:
default_database: "%mongodb_database%_%kernel.environment%"
default_document_manager: default
connections:
        default:
            server: "mongodb://%mongodb_host%:%mongodb_port%"
            options:
                db: "%mongodb_database%_%kernel.environment%"
                connect: true
#                timeout:
                connectTimeoutMS: 60000
                socketTimeoutMS: 60000
                wTimeoutMS: 60000
        shared:
            server: "mongodb://%mongodb_host%:%mongodb_port%"
            options:
                db: "%mongodb_database%_shared"
                connect: true
default_connection: default


document_managers:
.
.
.
.

It might be simple question but i am new to mongodb & docker so don't know where to change it.

Hassan
  • 930
  • 3
  • 16
  • 35
Maqsood
  • 369
  • 4
  • 17
  • did you find a way to set the timeouts? – asgs Oct 04 '18 at 11:10
  • 1
    @asgs I didn't find proper solution. I disable the PHP timeout limit on controller that were causing the error using *set_time_limit* and it solved the problem. – Maqsood Oct 08 '18 at 14:09
  • thank you. so there's no server-side timeouts that MongoDB supports :| – asgs Oct 08 '18 at 20:27

0 Answers0