
|
|
|
|
| CAUTION: External email. Please verify the veracity of the sender/content before opening a link or an attachment. |
This e-mail message and any attachments are for the sole use of the intended recipient(s) and may contain proprietary, confidential, trade secret or privileged information. Any unauthorized review, use, disclosure or distribution is prohibited and may be a violation of law. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.
Hi Ryan,
Thanks for your response. I am using Trac 1.0.15. Below are the list of plugins that I have installed.
1. agilo-0.9.152. Babel-1.3
3. CherryPy-3.2.24. Genshi-0.7
5. psycopg2-2.7.4
6. pysugarcrm-1.0.0
7. TracMenusPlugin-0.1
Other than those plugins I have used some downloaded and modified plugins as well.
The permission policies from trac.ini are,
permission_policies = DefaultPermissionPolicy, LegacyAttachmentPolicy
The lines logged in that attachment are just a sample. I am seeing similar repetitions for a lot of other issues as well. They are repeated for ten to fifteen times instead of just one.
Also, my trac site is very slow. I am using Apache + mod_wsgi + Django. What may be the reason for this slowness? Could you please direct me to fix the performance?
|
|
|
|
| CAUTION: External email. Please verify the veracity of the sender/content before opening a link or an attachment. |
To unsubscribe from this group and stop receiving emails from it, send an email to trac-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/85f5d4a1-24de-4675-8b30-b22870fabfb1%40googlegroups.com.
Hi,
I have used Trac1.0.15 hosted on apache2 as a virtual host. So it is like Trac + Apache2 + mod_wsgi combination. Also we have integrated DJANGO site with this Trac instance into that same virtualhost configuration.
From your previous mail, if performance checks are repeated and that will cause slowness, how can I fix that up? any idea? Also I have attached few more screenshots for your reference. It seems like the Environment is reloaded repeatedly or something strange is going on here.
In one of those screenshots "Nextnames" is a text that I printed to log file. But it is repeated many times instead of just one. Hope you can get some idea about that.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/85f5d4a1-24de-4675-8b30-b22870fabfb1%40googlegroups.com.
|
|
|
|
Yes you are correct. I used Environment.log.debug("some text") line to print to the log file
|
|
|
|
| CAUTION: External email. Please verify the veracity of the sender/content before opening a link or an attachment. |
I used that statement inside of a plugin. I am managing multiple Environments(projects) here. So I used the generic logging form like, self.log.debug("write this to log file") .
In some other places due to the need I imported the environment specifically like this,
from trac.env import Environment
current_env = Environment("/path/to/environment") # environment is a Projectcurrent_env.log.debug("Some text to the log file")
I have used this second method at many places.
#To force daemon mode
WSGIRestrictEmbedded On
<VirtualHost *:80>
ServerName subdomain.domainname.com
Redirect / https://subdomain.domainname.com
</VirtualHost>
<VirtualHost *:443>
ServerName subdomain.domainname.com
Protocols h2 h2c http/1.1
# uat conf
WSGIScriptAlias /auth /path/to/DJANGO/WSGI/file
WSGIDaemonProcess uat user=www-data group=www-data threads=25 python-path=/path/to/DJANGO/environment/Sourcecode
WSGIProcessGroup uat
SSLEngine on
SSLCertificateFile /path/to/cert/file
SSLCertificateKeyFile /path/to/key/file
SSLCertificateChainFile /path/to/chain/file
SSLProtocol all -SSLv3 -TLSv1 -TLSv1.1
SSLCipherSuite EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH
SSLHonorCipherOrder On
SSLCompression off
SSLSessionTickets off
RewriteEngine On
<Directory "/path/to/DJANGO/source">
<Files wsgi.py>
Require all granted
</Files>
</Directory>
Alias /static /path/to/DJANGO/source/static
<Directory "/path/to/DJANGO/source/static">
Require all granted
</Directory>
#Trac instance configuration
WSGIScriptAlias / /usr/share/trac/trac.wsgi
<Directory "/opt/TracProjects">
WSGIApplicationGroup %{GLOBAL}
Options Indexes FollowSymLinks
Order allow,deny
Allow from all
<IfModule mod_authz_core.c>
Require all granted
</IfModule>
</Directory>
# Mapping Static files
Alias /PMO/chrome /var/www/html/htdocs/htdocs
AliasMatch "^/([^/]*)/chrome/(.*)$" "/var/www/html/htdocs/htdocs/$2"
<Directory "/var/www/html/htdocs/htdocs">
Options -Indexes
<IfModule mod_authz_core.c>
Require all granted
</IfModule>
</Directory>
# Secure headers
<IfModule mod_headers.c>
Header set X-Content-Type-Options "nosniff"
Header set X-XSS-Protection "1;mode = block"
Header always append X-Frame-Options SAMEORIGIN
Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
Header edit Set-Cookie ^(.*)$ $1;HttpOnly;Secure
</IfModule>
Alias /authtimesheet "/var/www/html/A_PHP_site/public"
<Directory /var/www/html/A_PHP_site/public>
Options Indexes FollowSymLinks
DirectoryIndex index.php
AllowOverride All
Require all granted
</Directory>
ErrorLog /var/log/apache2/error.log
LogLevel info
CustomLog /var/log/apache2/access.log combined
</VirtualHost>
https://subdomain.domainname.com - This is the main site. This is mostly our Trac, implemented with Trac 1.0.15. But inside it we have hooked apps of two other frameworks.
2. We have a DJANGO app hooked and a PHP_site(Zend framework) hooked. We hooked them with Trac by creating different menus for them and then redirecting the tracffic to those pages.
Whenever the user hits the url https://subdomain.domainname.com/auth apache will direct user to DJANGO app. Then if the user clicks one the menu there, he will be directed to the Trac site I am running.
For your information, I have already created a separate thread about "Mapping the static resources" for this site here
Of course, I have installed my plugins globally, and I have only one single Trac instance in the server. So mapped the static resources as seen in the above virtualhost conf file. Now, tell me should I run the trac-admin deploy command for all those projects?(number is growing, for now 1000+ projects).
Second how can I change the conf file to make the site faster? Does this configuration affect logging the same lines multiple times?
I welcome all your suggestions to improve this site! Thank you in advance.
Of course, I have installed my plugins globally, and I have only one single Trac instance in the server. So mapped the static resources as seen in the above virtualhost conf file. Now, tell me should I run the trac-admin deploy command for all those projects?(number is growing, for now 1000+ projects).
Second how can I change the conf file to make the site faster? Does this configuration affect logging the same lines multiple times?
It's strange you would need to construct an Environment instance in a plugin, since it can be accessed in a Component instance as self.env. In the rare instance that it's necessary you probably want to use "open_environment" from trac.env, with use_cache=True.
You may want to temporarily disable your plugins and see if the duplicate logging ceases. Some of your plugins may not be implemented correctly.
Hi,I try that "open_environment" function and let you know the improvements.Second thing, below is my virtual host configuration. Please go through it and help me to fix any wrong configuration that I have made.
#Trac instance configuration
WSGIScriptAlias / /usr/share/trac/trac.wsgi
<Directory "/opt/TracProjects">
WSGIApplicationGroup %{GLOBAL}
Options Indexes FollowSymLinks
Order allow,deny
Allow from all
<IfModule mod_authz_core.c>
Require all granted
</IfModule>
</Directory>
# Mapping Static files
Alias /PMO/chrome /var/www/html/htdocs/htdocs
AliasMatch "^/([^/]*)/chrome/(.*)$" "/var/www/html/htdocs/htdocs/$2"
<Directory "/var/www/html/htdocs/htdocs">
Options -Indexes
<IfModule mod_authz_core.c>
Require all granted
</IfModule>
</Directory>