Environment variable PKG_RESOURCES_CACHE_ZIP_MANIFESTS

535 views
Skip to first unread message

bcostacurta

unread,
Jul 28, 2015, 2:07:18 AM7/28/15
to Trac Users
Hello,

my Trac version is v1.0,8

In the Apache log :

(..) Warning: Detected setuptools version 5.5.1. The environment variable 'PKG_RESOURCES_CACHE_ZIP_MANIFESTS' must be set to avoid significant performance degradation., referer: http://costacurta.org/trac


In the setuptools documentation I found the following explanaton :

(..)
If you're using setuptools versions 5.4 through 5.6, the environment variable PKG_RESOURCES_CACHE_ZIP_MANIFESTS should be set, otherwise the performance of Trac will be significantly degraded.
  • Linux: $export PKG_RESOURCES_CACHE_ZIP_MANIFESTS=1
(..)

however I'm confused about the correct location and/or user env. variable where to define this variable.
My Trac server is hosted under Debian + Apache.

Thanks for any clue or help.
Bruno

RjOllos

unread,
Jul 28, 2015, 12:30:31 PM7/28/15
to Trac Users, bcost...@gmail.com
Which version of Apache are you running?

You could try using SetEnv in the Apache configuration:
SetEnv PKG_RESOURCES_CACHE_ZIP_MANIFESTS 1

Bruno Costacurta

unread,
Jul 29, 2015, 1:03:05 PM7/29/15
to Trac Users
I'm using Apache 2.4
Yes I already defined in the Apache config file :

SetEnv PKG_RESOURCES_CACHE_ZIP_MANIFESTS 1

with Stop / re-start Apache, but it does'nt work.

Bye
Bruno

Ryan Ollos

unread,
Jul 29, 2015, 1:19:19 PM7/29/15
to trac-...@googlegroups.com
On Wed, Jul 29, 2015 at 10:02 AM, Bruno Costacurta <bcost...@gmail.com> wrote:
I'm using Apache 2.4
Yes I already defined in the Apache config file :

SetEnv PKG_RESOURCES_CACHE_ZIP_MANIFESTS 1

with Stop / re-start Apache, but it does'nt work.

Bye
Bruno

Maybe try editing /etc/apache2/envvars:

bcostacurta

unread,
Jul 29, 2015, 4:30:17 PM7/29/15
to Trac Users, ryan.j...@gmail.com, rjo...@gmail.com
Yes it works !

File /etc/apache2/envvars is the correct place to define :
export PKG_RESOURCES_CACHE_ZIP_MANIFESTS=1

followed by the Apache stop / re-start

Thanks again.
Bruno

Ryan Ollos

unread,
Jul 29, 2015, 4:32:36 PM7/29/15
to bcostacurta, Trac Users, Ryan Ollos
On Wed, Jul 29, 2015 at 1:30 PM, bcostacurta <bcost...@gmail.com> wrote:
Yes it works !

File /etc/apache2/envvars is the correct place to define :
export PKG_RESOURCES_CACHE_ZIP_MANIFESTS=1

followed by the Apache stop / re-start

Thanks again.
Bruno

Thank you for testing that out and reporting back. I'll make sure the documentation is updated to include the detail.

- Ryan
 

RjOllos

unread,
Jul 29, 2015, 8:37:14 PM7/29/15
to Trac Users, bcost...@gmail.com, ryan.j...@gmail.com, rjo...@gmail.com

I'm just curious, did you previously try adding the export statement to a script in profile.d, as documented here?:
I think I wrote that documentation, but I don't recall how much testing I did.

bcostacurta

unread,
Jul 30, 2015, 3:13:44 PM7/30/15
to Trac Users, ryan.j...@gmail.com, rjo...@gmail.com
Hi Ryan,

I did not test the ~/.profile.d you mentioned and refered in the Trac forums
However I find this confusing : to which user does the ~ refers to ?

Anyway, the /etc/apache2/envvars works fine under my Debian / Apache system for Trac.

Bye
Bruno

Ryan Ollos

unread,
Jul 30, 2015, 6:18:37 PM7/30/15
to bcostacurta, Trac Users, Ryan Ollos
On Thu, Jul 30, 2015 at 12:13 PM, bcostacurta <bcost...@gmail.com> wrote:
Hi Ryan,

I did not test the ~/.profile.d you mentioned and refered in the Trac forums
However I find this confusing : to which user does the ~ refers to ?

You'd either put the export statement in ~/.profile, or a script with the export statement in /etc/profile.d

In the case of the former, ~ would be the home directory of whatever user you are running tracd under. I guess this wouldn't work in the case of running Apache webserver with user www-data.

I haven't tested whether a script in /etc/profile.d that exported the variable would be visible to user www-data.

Mike Dewhirst

unread,
Jul 30, 2015, 7:54:09 PM7/30/15
to trac-...@googlegroups.com
On 31/07/2015 8:18 AM, Ryan Ollos wrote:
> On Thu, Jul 30, 2015 at 12:13 PM, bcostacurta <bcost...@gmail.com
> <mailto:bcost...@gmail.com>> wrote:
>
> Hi Ryan,
>
> I did not test the ~/.profile.d you mentioned and refered in the
> Trac forums
> However I find this confusing : to which user does the ~ refers to ?
>
>
> You'd either put the export statement in ~/.profile, or a script with
> the export statement in /etc/profile.d
>
> In the case of the former, ~ would be the home directory of whatever
> user you are running tracd under. I guess this wouldn't work in the case
> of running Apache webserver with user www-data.

It seems (in Ubuntu server) you can export environment variables for
www-data in Apache's own envvars file.

Maybe this is "global" and can't be used for vhosts. But maybe vhost
envvars files can be used? I'm not an Apache person.

Is there any reason to avoid this?

Thanks

Mike

>
> I haven't tested whether a script in /etc/profile.d that exported the
> variable would be visible to user www-data.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Trac Users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to trac-users+...@googlegroups.com
> <mailto:trac-users+...@googlegroups.com>.
> To post to this group, send email to trac-...@googlegroups.com
> <mailto:trac-...@googlegroups.com>.
> Visit this group at http://groups.google.com/group/trac-users.
> For more options, visit https://groups.google.com/d/optout.

bcostacurta

unread,
Aug 1, 2015, 12:36:54 PM8/1/15
to Trac Users, bcost...@gmail.com, rjo...@gmail.com, ryan.j...@gmail.com
Hi 

I tested into file /etc/profile the following :
export PKG_RESOURCES_CACHE_ZIP_MANIFESTS=1
but it does not work.
Please note user www-data has no home directory neither bash. It is only a technical user for Apache2 processes.

Definitely on my server, only the following definition into /etc/apache2/envvars works fine as :
# trac
export PKG_RESOURCES_CACHE_ZIP_MANIFESTS=1
#


Bruno

RjOllos

unread,
Sep 23, 2015, 4:47:08 PM9/23/15
to Trac Users, bcost...@gmail.com, rjo...@gmail.com, ryan.j...@gmail.com


On Saturday, August 1, 2015 at 9:36:54 AM UTC-7, bcostacurta wrote:
Hi 

I tested into file /etc/profile the following :
export PKG_RESOURCES_CACHE_ZIP_MANIFESTS=1
but it does not work.
Please note user www-data has no home directory neither bash. It is only a technical user for Apache2 processes.

Definitely on my server, only the following definition into /etc/apache2/envvars works fine as :
# trac
export PKG_RESOURCES_CACHE_ZIP_MANIFESTS=1
#


Bruno

I modified the documentation to clarify the workarounds when running TracStandalone and  Trac with Apache.

Bruno Costacurta

unread,
Sep 23, 2015, 4:56:03 PM9/23/15
to RjOllos, Trac Users, ryan.j...@gmail.com
Thanks for your follow up and your job for Trac.

Reply all
Reply to author
Forward
0 new messages