Ok I passed all the day debugging.

Thanks Marco, I didn't know about sqllogger.

What I know now that other devs used doctrine in a bad way here. When
running on local db you can't figure it out.

The page makes 3k query on the database (yes, for 1 user in 1 page). The db
response is around 200ms but as Benjamin suggests probably it becomes a lot
of traffic to handle. That's the slowness.

Now I know how to refactor some entities/pages.





2017-10-22 9:47 GMT+02:00 Benjamin Eberlei <[email protected]>:

> Do you have a way of asking a postgresql database how much data you sent
> back and forth over a connection since its opening? I would assume you can
> do that.
>
> Try to see how much that is, probably several MB for the request. So both
> latencies and amount of data are probably cause for this over a "very"
> remote database.
>
> Are you planning to run production co-located to the aiven.io offering?
> Then maybe you should try it from that location instead of your local
> machine. Remote database in my opinion still requires it to be just a few
> hops away in the same datacenter.
>
> greetings
> Benjamin
>
> On Sat, Oct 21, 2017 at 8:10 PM, Gianpaolo Di Nino <
> [email protected]> wrote:
>
>> Hi,
>>
>> after years on hosting solutions we would like to upgrade to a cloud
>> solution.
>>
>> Our actual architecture is as it follows:
>>
>> nginx - php-fpm - postgresql
>>
>> We are using Zend1 as a framework with doctrine 2.3.6. We customize a lot
>> of thing so is not possibile right now to upgrade libs, but we are
>> rewriting a lot of things and we are switching on a modular architecture
>> with rest-api and microservices.
>>
>> This will take time and we would like to externalize the database and let
>> this handle in a better way.
>>
>> As I said before we host and manage our solutions.
>>
>> We got 2 servers in replica. Postgresql is in master/slave mode. It works
>> but it has been a bit hard to put up.
>>
>> We never liked to have the database where the web resides, so after a
>> tons of search we are trying aiven.io to host our db (enterprise
>> solution).
>>
>> After uploading our database (15G) and we connected from normal pgsql
>> client we noticed the amazing speed, but connecting the web app produced
>> very bad performance.
>>
>> A page that runs in less than 3 second in my local notebook runs in 45
>> seconds when connected to the remote database.
>>
>> The test has been done, obviously, in a heavy page.
>>
>> Are we missing something in configuration?
>>
>> We already configured APCu cache, and no eager fetch is envolved.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "doctrine-user" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To post to this group, send email to [email protected].
>> Visit this group at https://groups.google.com/group/doctrine-user.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "doctrine-user" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/to
> pic/doctrine-user/M0Sf4EKBvsw/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/doctrine-user.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
----------------------
If you think you are too small to make a difference,
try sleepin' in a closed room with a mosquito!!
----------------------

-- 
You received this message because you are subscribed to the Google Groups 
"doctrine-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/doctrine-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to