{
"info": {
"author": "Nexedi SA",
"author_email": "erp5-dev@erp5.org",
"bugtrack_url": null,
"classifiers": [
"Framework :: Zope2",
"Intended Audience :: System Administrators",
"Programming Language :: Python"
],
"description": "Introduction\n============\n\nThis product dumps stack traces of long running requests of a Zope2 instance to\na log file. If a request takes more than a configured timeout, it's stack trace\nwill be dumped periodically to a log file.\n\nIt was authored by Leonardo Rochael Almeida, and made possible with developer\ntime generously donated by `Nexedi `_, and with design\ninput from S\u00e9bastien Robin and Julien Muchembled.\n\n.. WARNING:: Products.LongRequestLogger does not work if\n `sauna.reload `_ is enabled.\n\nInstallation\n============\n\nBuildout Installation\n---------------------\n\nAdd \"Products.LongRequestLogger\" to the list of eggs of the part\nthat defines your Zope instance.\n\nConfiguration\n=============\n\nAdd (or change) a \"\" section of your\nzope.conf to something like this::\n\n \n logfile $INSTANCE/log/longrequest.log0.log\n timeout 4\n interval 2\n \n\nThe following variables are recognised:\n\n * \"logfile\": This is a mandatory variable. Its absence means the\n LongRequestLogger monkey-patch to the publication machinery will not be\n applied. It should point to a file where you want the long requests to be\n logged.\n\n * \"timeout\": The amount of seconds after which long requests\n start being logged. Accepts floating point values and defaults to 2.\n\n * \"interval\": The frequency at which long requests will have\n their stack trace logged once they have exceeded their 'timeout' above.\n Defaults to 1 and accepts floating point values.\n\nInterpreting results\n====================\n\nIt's important to keep in mind a few important facts about the behaviour of\nZope2 applications and threads while looking at the results:\n\n 1. Each thread only handles one request at a time.\n \n 2. Slow requests will usually have tracebacks with a common top part and a\n variable bottom part. The key to the cause of the slowdown in a request\n will be in the limit of both.\n\nIf you're in a pinch and don't want to parse the file to rank the slowest\nURLs for investigation, pick up a time in seconds that's a multiple of your\ninterval plus the timeout and grep for it. For the default settings, of\ntime-out and interval, you will find log entries for 4 then 6 then 8 seconds,\nso you can do a grep like::\n\n $ grep -n \"Running for 8\" longrequest.log \n\nAnd decide with URLs show up more. Then you can open the log file, go to the\nline number reported and navigate the tracebacks by searching up and down\nthe file for the same thread id (the number after \"Thread\" in the reported\nlines). Then analise the difference between the tracebacks of a single request\nto get a hint on what this particular request is doing and why it is slowing\ndown.\n\nBy doing this for a number of similar requests you will be able to come up with\noptimisations or a caching strategy.\n\n\nChangelog\n=========\n\n2.1.0 (2017-09-11)\n------------------\n\n- Log exceptions that are raised while dumping the request. Unprintable\n requests caused the monitor thread to die, resulting in EPIPE errors\n in the ZPublisher wrapper.\n\n- Do never repeat request information, traceback or SQL query if unchanged.\n\n2.0.0 (2015-11-04)\n------------------\n\n- Configuration is now done with a \"product-config\" section in zope.conf,\n instead of environment variables.\n\n- Log queries executed by ZMySQLDA.\n\n- Consolidate stack trace output to a single line if it's the same as the\n previous stack trace.\n\n- Remove the seemly unused mechanism for changing the behaviour at runtime by\n changing environment variables, like redirecting logging to a different\n filename, stopping the logging or changing the timeouts. Log rotation still\n works normally.\n\n- Stop creating and ending one extra thread per request. Instead, a single\n monitoring thread is launched at startup.\n\n- Drop compatibility with Python < 2.6.\n\n1.1.0 (2012-09-10)\n------------------\n\n- Some refactoring for code readability.\n\n- Use a `os.pipe()` pair and `select.select()` instead of\n `threading.Condition` to signal when the monitor should stop tracing\n the original thread. This avoids a performance bottleneck in some\n VMWare installations, which seem not to have good performance for locks\n in certain conditions.\n\n- Integrate the logging mechanism with Zope's signal handling and ZConfig's\n rotating file handler so that USR2 signals will cause the long request log\n to get reopened analogous to the access and event log.\n\n1.0.0 (2010-10-28)\n------------------\n\n- Initial release\n",
"description_content_type": null,
"docs_url": null,
"download_url": "",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "https://github.com/zopefoundation/Products.LongRequestLogger",
"keywords": "performance zope2 plone erp5",
"license": "ZPL",
"maintainer": "",
"maintainer_email": "",
"name": "Products.LongRequestLogger",
"package_url": "https://pypi.org/project/Products.LongRequestLogger/",
"platform": "",
"project_url": "https://pypi.org/project/Products.LongRequestLogger/",
"project_urls": {
"Homepage": "https://github.com/zopefoundation/Products.LongRequestLogger"
},
"release_url": "https://pypi.org/project/Products.LongRequestLogger/2.1.0/",
"requires_dist": null,
"requires_python": "",
"summary": "Dumps sequential stack traces of long-running Zope2 requests",
"version": "2.1.0"
},
"last_serial": 3165967,
"releases": {
"1.0": [
{
"comment_text": "",
"digests": {
"md5": "f674ba082c08f07e6173784ee4b3ba4b",
"sha256": "17ea6bfcc8fd88f17c6d478e0b3519e83b49683a866b690b6686fc62b9d5e89c"
},
"downloads": -1,
"filename": "Products.LongRequestLogger-1.0.tar.gz",
"has_sig": false,
"md5_digest": "f674ba082c08f07e6173784ee4b3ba4b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 16388,
"upload_time": "2010-10-28T18:04:25",
"url": "https://files.pythonhosted.org/packages/da/a4/8caa8223569c53a248f45cda2290cd56ea43e1b8e35516902ab653da7f5d/Products.LongRequestLogger-1.0.tar.gz"
}
],
"1.1.0": [
{
"comment_text": "",
"digests": {
"md5": "f7f35e81e26f6fa5bf55867122902b78",
"sha256": "3157df21fe25ce3cca01d529166e4d05b87a36ebdde2b6e3bd8685cafd6ae147"
},
"downloads": -1,
"filename": "Products.LongRequestLogger-1.1.0.zip",
"has_sig": false,
"md5_digest": "f7f35e81e26f6fa5bf55867122902b78",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 22962,
"upload_time": "2012-09-10T18:48:24",
"url": "https://files.pythonhosted.org/packages/46/09/1c44807aa612f3a408922765b57f1d27c75d347363a1eb5441987ed77580/Products.LongRequestLogger-1.1.0.zip"
}
],
"2.0.0": [
{
"comment_text": "",
"digests": {
"md5": "31719a5b2179574351abfdf245e72a9d",
"sha256": "5371867eb7ef39a74ac2054c7ef5da1d957160daf00de9c151e1eb40dadec4ec"
},
"downloads": -1,
"filename": "Products.LongRequestLogger-2.0.0.tar.gz",
"has_sig": false,
"md5_digest": "31719a5b2179574351abfdf245e72a9d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 9481,
"upload_time": "2015-11-04T19:13:45",
"url": "https://files.pythonhosted.org/packages/f0/43/ff2857924b524e0c098ed0562ef455b073d227e6300752b4557cf3813fbe/Products.LongRequestLogger-2.0.0.tar.gz"
}
],
"2.1.0": [
{
"comment_text": "",
"digests": {
"md5": "39fbabb72d9cf0fa86281d340e2a2e1a",
"sha256": "f34367cd7a2e8ec50b6d20a9824b93136741a15d29fe93506aed36d84e4511b2"
},
"downloads": -1,
"filename": "Products.LongRequestLogger-2.1.0.tar.gz",
"has_sig": true,
"md5_digest": "39fbabb72d9cf0fa86281d340e2a2e1a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 10173,
"upload_time": "2017-09-11T18:26:49",
"url": "https://files.pythonhosted.org/packages/45/fd/05aaa7eba8d3cd8006e44e105b70cc84b9365dd43d98ca849e13628c8a97/Products.LongRequestLogger-2.1.0.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "39fbabb72d9cf0fa86281d340e2a2e1a",
"sha256": "f34367cd7a2e8ec50b6d20a9824b93136741a15d29fe93506aed36d84e4511b2"
},
"downloads": -1,
"filename": "Products.LongRequestLogger-2.1.0.tar.gz",
"has_sig": true,
"md5_digest": "39fbabb72d9cf0fa86281d340e2a2e1a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 10173,
"upload_time": "2017-09-11T18:26:49",
"url": "https://files.pythonhosted.org/packages/45/fd/05aaa7eba8d3cd8006e44e105b70cc84b9365dd43d98ca849e13628c8a97/Products.LongRequestLogger-2.1.0.tar.gz"
}
]
}