Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Python (user "_teamsserver") constantly using 99% of CPU?

Hello. Activity Monitor shows Python (user "_teamsserver") constantly using 99% of CPU. This has been happening for a couple of months--maybe since I upgraded to 10.9 and Server 3. Before that I was running Server on 10.8.x and there was no issue.


I understand Python is a scripting language. Apparently in my case it seems to be stuck in some sort of loop.


In order to try to figure out what's going on, in Terminal I entered "ps auxw | grep 354" and this was the output:


_teamsserver 354 100.0 65.2 10004512 5472880 ?? R 6:26PM 203:03.01 /usr/bin/python /Applications/Server.app/Contents/ServerRoot/usr/bin/xpostgres -D /Library/Server/Wiki/Database.xpg/Cluster.pg -c log_line_prefix=%t -c log_lock_waits=on -c log_statement=ddl -c logging_collector=on -c max_connections=500 -c unix_socket_directory=/Library/Server/Wiki/PostgresSocket -c unix_socket_group=_teamsserver -c unix_socket_permissions=0770 -c log_connections=on -c listen_addresses= -c log_directory=/Library/Server/Wiki/Logs -c log_filename=postgres-%a.log -c log_rotation_age=1440 -c log_truncate_on_rotation=on

conference 6581 0.0 0.0 2432784 596 s000 S+ 9:51PM 0:00.00 grep 354


So it seems to be related to the Wiki services in the Server app? I only use the Server app for very light file sharing among a small group. (By the way, I turned off file sharing, so that no server services were running, restarted the machine and Python continued to use 99% of the CPU.) I have never used any Wiki services and have no interest in doing so.


I've reset the SMC controller and PRAM and fixed all permissions.


I got a sample of the Python process from Activity Monitor, but don't want to paste it here because it's too long.


I also got a system diagnosis file from Activity Monitor.


(By the way, this is on a 2010 MacBook Pro, 8 GB RAM, 240 GB SSD, running Mavericks 10.9.4.).


Any thoughts or help would be appreciated.


Thanks in advance!

Posted on Jul 8, 2014 9:23 PM

Reply
9 replies

Jul 8, 2014 9:53 PM in response to palm disaster

Check with Server.app whether the Websites service and Wiki service are on.

if you are not using it, turn off Wiki service, then under Websites, disable PHP and Python settings and then turn off websites.


Confirm with commands: sudo serveradmin fullstatus web; sudo serveradmin fullstatus wiki

If required: sudo serveradmin stop wiki ; sudo serveradmin stop web


Cheers

Jul 9, 2014 12:09 AM in response to Linc Davis

My recollection is that it's a permissions issue. I don't think I want ignore ownership on the partition. I've went that route a few years ago and it wasn't the optimal solution for various reasons. Server worked fine for a couple of years until a few months ago.


In addition to permissions issues, in my mind the server gives you an additional level of security, for whatever that's worth, beyond just having a shared partition freely available to anyone on the network.


Maybe I just revisit my thinking and try doing a shared partition with ignored ownership.


In any case, however, I would like for Server to run normally...

Jul 9, 2014 12:25 PM in response to Linc Davis

Thank you both for the speedy help.


I used dwbrecovery's command (adding a "sudo") at the beginning and restarted Server. The problem was still there.


So I uninstalled server (with the help of these instructions How to uninstall Lion Server?). (By the way, I got a pop up message that all of the Server services turedn off when the app was trashed.)


The problem is gone now.


I will try using the shared partition for a while and if that doesn't work I'll reinstall Server and report back on whether the problem returns if I reinstall it.


Thanks again!

Jul 10, 2014 9:18 AM in response to palm disaster

I have a similar issue with Python and _teamsserver. I am using file sharing in Server (3.1.2) as well as Time Machine. I would like to eventually use other services so I don't want to remove Server. I was also having high processor usage with Python and _devicemgr. I moved Server to the Trash but did not empty. That quit the processes and I was able to trash the log that had grown to 1.58 GB. I then put the Server app back in the Applications folder and restarted.


That resolved my Python _devicemgr high processor usage but I still have the issue with high Python _teamsserrver processor usage.


Any ideas Linc?


Thanks!

Jul 15, 2014 7:51 AM in response to Linc Davis

I have a similar issue with Python and _teamsserver. I am using file sharing in Server (3.1.2) as well as Time Machine. I would like to eventually use other services so I don't want to remove Server. I was also having high processor usage with Python and _devicemgr. I moved Server to the Trash but did not empty. That quit the processes and I was able to trash the log that had grown to 1.58 GB. I then put the Server app back in the Applications folder and restarted.


That resolved my Python _devicemgr high processor usage but I still have the issue with high Python _teamsserrver processor usage.


Any ideas Linc?


Thanks!

Python (user "_teamsserver") constantly using 99% of CPU?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.