Edgewall Software
Modify

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#12085 closed defect (cantfix)

custom PYTHON_EGG_CACHE path for fcgi_frontend = 100% cpu

Reported by: xuefer@… Owned by:
Priority: normal Milestone:
Component: general Version: 1.0.6
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

I'm running trac using fcgi_frontend. by setting PYTHON_EGG_CACHE=some path, even to the default value of PYTHON_EGG_CACHE, will cause python/trac to read egg file again and again, but never read the files in PYTHON_EGG_CACHE folder. (only .mo files are read)

strace -e open -fp ...

[pid  7532] open("/usr/local/lib/python2.7/site-packages/Trac-1.0.6post2-py2.7.egg", O_RDONLY) = 25
[pid  7531] open("/usr/local/lib/python2.7/site-packages/Trac-1.0.6post2-py2.7.egg", O_RDONLY) = 37
[pid  7532] open("/usr/local/lib/python2.7/site-packages/Trac-1.0.6post2-py2.7.egg", O_RDONLY) = 25
[pid  7532] open("/usr/local/lib/python2.7/site-packages/Trac-1.0.6post2-py2.7.egg", O_RDONLY) = 25
[pid  7532] open("/usr/local/lib/python2.7/site-packages/Trac-1.0.6post2-py2.7.egg", O_RDONLY) = 25
[pid  7532] open("/usr/local/lib/python2.7/site-packages/Trac-1.0.6post2-py2.7.egg", O_RDONLY) = 25
[pid  7532] open("/usr/local/lib/python2.7/site-packages/Trac-1.0.6post2-py2.7.egg", O_RDONLY) = 25
[pid  7532] open("/usr/local/lib/python2.7/site-packages/Trac-1.0.6post2-py2.7.egg", O_RDONLY) = 25
[pid  7532] open("/usr/local/lib/python2.7/site-packages/Trac-1.0.6post2-py2.7.egg", O_RDONLY) = 25
[pid  7532] open("/usr/local/lib/python2.7/site-packages/Trac-1.0.6post2-py2.7.egg", O_RDONLY) = 25
[pid  7532] open("/usr/local/lib/python2.7/site-packages/Trac-1.0.6post2-py2.7.egg", O_RDONLY) = 25

without setting any PYTHON_EGG_CACHE (or re-install with zip_safe = False) it's just fine.

Attachments (0)

Change History (5)

comment:1 by anonymous, 10 years ago

python —version Python 2.7.9

comment:2 by anonymous, 10 years ago

hrm.. the statement about PYTHON_EGG_CACHE seems false. i still need to use zip_safe to by pass the egg issue

comment:3 by Jun Omae, 10 years ago

It seems to be a setuptools issue. If setuptools 5.4 - 5.6 is using, it would lead performance degradation. See TracInstall#Usingeasy_install.

Could you please post versions of using libraries from System Information in your /about page?

comment:4 by anonymous, 10 years ago

System Information

Package	Version
Trac	1.0.6post2
Babel	1.3
Genshi	0.7 (with speedups)
Pygments	2.0.1
pysqlite	2.6.0
Python	2.7.9 (default, Mar 1 2015, 12:57:24) [GCC 4.9.2]
pytz	2012c
setuptools	5.5.1
SQLite	3.8.7.1
Subversion	1.8.10 (r1615264)
jQuery	1.7.2
jQuery UI	1.8.21
jQuery Timepicker	1.0.1

exactly as you describe. sorry that i didn't read "Mandatory Dependencies" because i couldn't figure out the packages' version before my Trac setup is up again

i just check setup.py it says install_requires = [ 'setuptools>=0.6b1', ... ], but i can get it installed without satisfying the requirement

this is Linux lighttpd.net 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt9-3~deb8u1 (2015-04-24) x86_64 GNU/Linux

Last edited 10 years ago by Jun Omae (previous) (diff)

comment:5 by Jun Omae, 10 years ago

Resolution: cantfix
Status: newclosed

Closing as an InstallationIssue.

Currently, when setuptools 5.4-5.6 is detected, Trac issues the warning to stderr of trac-admin and web server. If wsgi.errors is available, use it instead of the stderr, e.g. mod_wsgi. Introduced in [13116].

$ /dev/shm/setuptools/bin/trac-admin
Warning: Detected setuptools version 5.4. The environment variable 'PKG_RESOURCES_CACHE_ZIP_MANIFESTS' must be set to avoid significant performance degradation.
trac-admin - The Trac Administration Console 1.0.6post2

Usage: trac-admin </path/to/projenv> [command [subcommand] [option ...]]

Invoking trac-admin without command starts interactive mode.

help     Show documentation
initenv  Create and initialize a new environment

See also pypa-setuptools-issue:240.

Last edited 10 years ago by Jun Omae (previous) (diff)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The ticket will remain with no owner.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from (none) to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.