Tag Info

Hot answers tagged

5

Have you enabled mod_python.load in mods-enabled? You can do this by just creating a softlink to the same file in mods-available.


4

Python 2.6 is available via EPEL. To enable EPEL for your box, just do a: rpm -ivh http://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm Then, to install Python 2.6: yum install python26 there is also a mod_python from there too: yum install python26-mod_python To find additional packages: yum search python26


3

You didn't asked for a specific version of ISPConfig so I'll assume you are using ISPConfig 3. I didn't tried that by myself, but I've found here a step-by-step instructions on how to install ispconfig3 + django + mod_wsgi - Django and mod_wsgi | HowToForge Forums If somethings goes wrong you could try reply to the mentioned thread or start a new thread ...


3

See if the module was loaded properly by issuing apache2ctl -t -D DUMP_MODULES or apachectl -t -D DUMP_MODULES. If it wasn't, edit your httpd.conf or an included file to include the following (replace lib with lib64 if needed): LoadModule wsgi_module /usr/lib/httpd/modules/mod_wsgi.so Do note that you can't execute any python script with WSGI - it has to ...


3

more easy way to do it a2enmod python


3

I have found mod wsgi to be faster than mod python. I posted a writeup on how to setup Trac with mod_wsgi here


2

If I were you, I'd look if using mod_wsgi instead of mod_python is possible. (It usually is). mod_python has several issues and is unmaintained. No one has interest in it anymore. mod_wsgi on the other hand is an actively maintained and modern alternative. And there is a binary download available for you. Yes, this is not a direct answer to your question ...


2

I've had similar issues when repeatedly restarting Apache on my laptop (for me it took about 40 restarts); the only solution I found was to restart the computer entirely. Of course, my laptop has 2GB of RAM and a lot more disk space than your server probably does, so you might run into this problem more quickly... basically, I'd avoid restarting Apache too ...


2

For information: There's a discussion about that point at http://trac.edgewall.org/ticket/7490. They are referring to performance issues with KeepAlive in Apache2.x with mod_python. Quoted from follow up 17: with keepalive on we got constant 80% CPU utilization on our server with keepalive off we got constant 15% CPU utilization on our server CPU ...


2

This doesn't answer your question, but mod_wsgi has pretty much superseded mod_python. If possible, I'd consider using it http://code.google.com/p/modwsgi/


2

The message is from mod_python, telling you that it was compiled with Python 2.6.5 but the system's Python installation is 2.6.6. It will still work regardless of the version mismatch. Anyway, mod_python hasn't seen any development in a number of years and has been deprecated by most projects in favour of alternatives like mod_wsgi.


2

Use the absolute path: /usr/local/bin/python2.5 /path/to/your/script


2

Just use an additional repository like the one of the IUS Community Project, which contains the latest release of Python 2.6 and 3.1.


2

To answer your question you can set net.netfilter.nf_conntrack_tcp_timeout_established in sysctl.conf The default is like 5 days, which can be dramatically lowered with out affecting any likely 443 traffic. net.ipv4.netfilter.ip_conntrack_max can also be bumped up.


1

If you're using smartfile repo, then why not install MySQL-python from that: # yum --enablerepo=smartfile install MySQL-python26


1

in Step 2 try add LDFLAGS with right path... for example env LDFLAGS="-L/opt/python2.6/lib -R/opt/python2.6/lib" ./configure --prefix=/opt/python2.6 --with-threads --enable-shared


1

When you compile python2.6 with --prefix=/opt/python2.6, the binaries will be installed at /opt/python2.6/bin, the libraries at /opt/python2.6/lib, ... /opt/python2.6/bin/python: error while loading shared libraries: libpython2.6.so.1.0: cannot open shared object file: No such file or directory This error means that python is not looking at the ...


1

Both can run in embedded mode, but only mod_wsgi can run in daemonmode. Mod_wsgi is also written in C, so it has less overhead than mod_python (meaning lower memory/cpu footprint). Another reason to use mod_wsgi over python is that mod_python is dead.


1

You need to use sudo to run pfctl from your web application and you need to add the "apache" user to the sudoers file with the rights to run pfctl without asking for a password. NOTE: To modify your sudoers file use the command visudo as root, or an account with elevated privileges to do so. You might also not want to use the obsolete mod_python way of ...


1

You can compile python2.x with another user (i use py26 as username) by wget http://www.python.org/ftp/python/2.6.7/Python-2.6.7.tgz tar xzvf Python-2.6.7.tgz cd Python-2.6.7 ./configure --prefix=$HOME/python make make install then add $HOME/python/bin to $PATH, so python2.6 only used by py26 user


1

You didn't say which operating system you're running but I see that under Debian it's not supported under Python 2.6 or higher, even in the testing or unstable version. Mod_python is pretty much obsolete. Most people have switched to mod_wsgi and are building Python apps using wsgi compatible frameworks such as Django, Pylons etc. ...


1

That you are even asking makes me think you are using Windows. Windows binaries for mod_python are only available up to Python 2.5. There are no binaries for mod_python for Python 2.6 and Python 3.X is not supported at all by mod_python. You could build mod_python yourself from source code, but you will need Visual Studio 2008. On most UNIX systems which ...


1

Build mod_python against the appropriate version of Python. Better yet, abandon the now-dead mod_python altogether and use mod_wsgi instead.


1

The following stands out as possibly wrong to me: WSGIApplicationGroup %{ENV:SUBDOMAIN} Why have: RewriteRule . - [E=APPLICATION_GROUP:${tolower:%{SERVER_NAME}}] if you are then not using 'APPLICATION_GROUP'. BTW, have you used: http://code.google.com/p/modwsgi/wiki/CheckingYourInstallation#Embedded_Or_Daemon_Mode ...


1

Where's the Django project located? You'll need to point your PythonPath at the project, not necessarily the Django library files. It's configured to look in /usr/local/lib/python2.7/sidt-packages/django/bin/projectname; that should be "site-packages" instead, but confirm that that's where the project files are located (is "projectname" correct?).


1

You need to build it using python 2.6's development libraries afaik, but a much better solution is to use FastCGI/SCGI, which will let you run not only multiple versions of python on apache, but also multiple versions of php, ruby, and other webapps, even if you decide you want to move to lighttpd, nginx, or some other webserver too. It's not without ...


1

There was also a similar question on the Trac ML, probably it help you (in particular the last mail with a possible configuration of Apache): ML Mail (Google Groups) " Trac 0.11 so slow!!!!!" Edit Probably, but as I didn't have such problems, this could be also from interest for you: performance and garbage collection. However, I don't think this is the ...


1

If you have mod_deflate enabled, try disabling it.


1

It also depends on your database. Which database server are you using? Is it on the same host as your Trac server? Are you sure the CPU usage is coming from Apache? Personally I've found trac runs better on mod_fastcgi, and even better on mod_wsgi. We're using a VM on a modestly spec'd VM host to host our Trac instance and it's in constant use (as in being ...


1

Googling around, I've found this solution: You actually need to increase the amount of SysV Semaphores on your system. I use (in /etc/sysctl.conf): kernel.sem = 512 32000 100 512 (set the options in this file by running sysctl -p). BTW. mod_python is a bit obsolete, since introduction of WSGI. Most modern applications can be run using ...



Only top voted, non community-wiki answers of a minimum length are eligible