[Mayan EDMS: 2082] mayan slow when external postgres database, configure django.db.backends

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[Mayan EDMS: 2082] mayan slow when external postgres database, configure django.db.backends

Tony Nys
Mayan is extremely slow when targeting an external postgres.
When I run the docker image locally and a local postgres , it is fast;

but when I run towards an external Postgres (in Azure) it is extremely slow
(5 seconds to show the recent document list page with only 2 docs)

I try to debug the performance, so I'v put this logging inside

/usr/share/mayan-edms/lib/python2.7/site-packages/mayan/settings/local.py


However, it only logs the initial DDL of the "initialsetup" phase in mayan db creation

but not the queries and response times executing the SQL


this is the log config:


LOGGING = {

    'version': 1,

    'disable_existing_loggers': False,

    'handlers': {

        'file': {

            'level': 'DEBUG',

            'class': 'logging.FileHandler',

            'filename': '/var/log/django.debug.log',

        },

    },

    'loggers': {

        'django.db.backends': {

            'handlers': ['file'],

            'level': 'DEBUG',

            'propagate': True,

        },

    },


}

--

---
You received this message because you are subscribed to the Google Groups "Mayan EDMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

[Mayan EDMS: 2089] Re: mayan slow when external postgres database, configure django.db.backends

rosarior
Administrator
To clarify: When you say "external Postgres (in Azure)" that means the Mayan container is in your local network and the PostgreSQL database is in the Azure cloud?

On Thursday, September 7, 2017 at 1:03:49 PM UTC-4, Tony Nys wrote:
Mayan is extremely slow when targeting an external postgres.
When I run the docker image locally and a local postgres , it is fast;

but when I run towards an external Postgres (in Azure) it is extremely slow
(5 seconds to show the recent document list page with only 2 docs)

I try to debug the performance, so I'v put this logging inside

/usr/share/mayan-edms/lib/python2.7/site-packages/mayan/settings/local.py


However, it only logs the initial DDL of the "initialsetup" phase in mayan db creation

but not the queries and response times executing the SQL


this is the log config:


LOGGING = {

    'version': 1,

    'disable_existing_loggers': False,

    'handlers': {

        'file': {

            'level': 'DEBUG',

            'class': 'logging.FileHandler',

            'filename': '/var/log/django.debug.log',

        },

    },

    'loggers': {

        'django.db.backends': {

            'handlers': ['file'],

            'level': 'DEBUG',

            'propagate': True,

        },

    },


}

--

---
You received this message because you are subscribed to the Google Groups "Mayan EDMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

[Mayan EDMS: 2094] Re: mayan slow when external postgres database, configure django.db.backends

Tony Nys
In reply to this post by Tony Nys
yes correct
even so if both are in the azure cloud
By the way i'm doing stress tests today comparing local with azure installations


On Thursday, September 7, 2017 at 7:03:49 PM UTC+2, Tony Nys wrote:
Mayan is extremely slow when targeting an external postgres.
When I run the docker image locally and a local postgres , it is fast;

but when I run towards an external Postgres (in Azure) it is extremely slow
(5 seconds to show the recent document list page with only 2 docs)

I try to debug the performance, so I'v put this logging inside

/usr/share/mayan-edms/lib/python2.7/site-packages/mayan/settings/local.py


However, it only logs the initial DDL of the "initialsetup" phase in mayan db creation

but not the queries and response times executing the SQL


this is the log config:


LOGGING = {

    'version': 1,

    'disable_existing_loggers': False,

    'handlers': {

        'file': {

            'level': 'DEBUG',

            'class': 'logging.FileHandler',

            'filename': '/var/log/django.debug.log',

        },

    },

    'loggers': {

        'django.db.backends': {

            'handlers': ['file'],

            'level': 'DEBUG',

            'propagate': True,

        },

    },


}

--

---
You received this message because you are subscribed to the Google Groups "Mayan EDMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

[Mayan EDMS: 2097] Re: mayan slow when external postgres database, configure django.db.backends

Tony Nys
In reply to this post by Tony Nys
actually it is not the database i think, 
all thumbnails take between .5 and 1 second to show
... they should be cached on the server ? so just serving up a static image file should be much faster...


On Thursday, September 7, 2017 at 7:03:49 PM UTC+2, Tony Nys wrote:
Mayan is extremely slow when targeting an external postgres.
When I run the docker image locally and a local postgres , it is fast;

but when I run towards an external Postgres (in Azure) it is extremely slow
(5 seconds to show the recent document list page with only 2 docs)

I try to debug the performance, so I'v put this logging inside

/usr/share/mayan-edms/lib/python2.7/site-packages/mayan/settings/local.py


However, it only logs the initial DDL of the "initialsetup" phase in mayan db creation

but not the queries and response times executing the SQL


this is the log config:


LOGGING = {

    'version': 1,

    'disable_existing_loggers': False,

    'handlers': {

        'file': {

            'level': 'DEBUG',

            'class': 'logging.FileHandler',

            'filename': '/var/log/django.debug.log',

        },

    },

    'loggers': {

        'django.db.backends': {

            'handlers': ['file'],

            'level': 'DEBUG',

            'propagate': True,

        },

    },


}

--

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