morbo slows down and hangs after a while - macos

When developing an app, I have running morbo for several hours to check the impacts of my changes - so far, I think this is exactly what morbo has been developed for.
But after a while (aprox. 2 hours) the app starts to get unresponsive and finally hangs. If that happens I can not stop morbo anymore with Ctrl+C. The only way is to kill the two morbo-processes (ps -ax | grep morbo, kill -9 <id1> <id2>. Unfortunately that does not cure the system in an sustainable way - after a few minutes the app hangs again. The only way is to restart the whole machine, which is quiet uncommon for a UNIX based OS.
System: OS X, Perl v5.12.3 darwin-2level, Mojolicious (5.44, Tiger Face)
Any idea?

Related

lenovo system ignoring SetThreadExecutionState() and was missing "Allow wake timers"?

I have come across a Lenovo IdeaCentre A540-24ICB system with a scheduled task that wakes the computer to start my application and it seems to start but the system goes back to sleep right away. Sometimes it appears to not start (or goes to sleep so fast nothing is logged yet) so I checked the Windows power sleep options to ensure "Allow wake timers" was enabled but it didn't exist! Searching online I found a registry entry to add to have it show up in the power options and then ensured it's was enabled. However, didn't make a difference.
I have to use the mouse/keyboard for the computer to wake long enough to run the application (it will start where it left off). The application has been used for years and waking and running has worked. It already tells the system to not go to sleep through the api call in the main processing thread (which could take a fraction of a second to get to):
SetThreadExecutionState(ES_CONTINUOUS | ES_SYSTEM_REQUIRED);
I thought that API was enough to prevent system from going to sleep? As mentioned, it has worked for years. It's just this new Lenovo system or the Win10 installed with it doesn't seem to honor it? Is there some other API call that needs to be called? or any checks / fix the app should do to ensure the SetThreadExecutionState() will work?
TIA!!

Keep GoLang Server Running

I run the server.go file using "iTerm2" software from my macbook pro. But as the server's availability depends upon that "iTerm2" running or not it stops working as soon as my macbook pro goes in sleep mode or the iTerm2 software is interrupted in any way. I need my GoLang Server to run 24x7. What do I do? I tried searching on google and since my English is not good I can not find the right answer.
I have been trying to find a solution for this problem from weeks now.
Please help.
Use tmux or screen put the session run in the background.
Or just run your command &; disown
Otherwise, your computer shutting down or getting into sleep will both interrupt or pause the background process, so in real world 24x7, you need a cloud service unless keeping your computer running 24x7.

Application heating up and using more cpu percentages in mac

As a developer I love to use firefox but it uses more then 50% of cpu and my mac book air becomes hot. I have already tried making hardware render off. still its same issue.
Some times when I use adobe premier its render process eats CPU, sometimes 180% and running this much CPU for longer run is obviously not healthy.
Any workaround
What I found is following.
This step can be used for other cpu incentive applications also.
so, just follow the steps
Install cputhrottle
brew install cputhrottle
Open activity monitor
( well, command+space and activity monitor ;) )
Note PID of any process that is taking much cpu resources
on terminal run this command
sudo cputhrottle PID 25
here 25 is the max percentage you want to allow for this process to take.
terminal will keep continue to run this process so do not close this terminal .
In case of premier, it will take longer then before, but will keep your MAC running at least :)

OS X Server 10.6.8 keeps crashing

I have an OS X Server 10.4 that started Kernel Panicking on me late december. It had Mail, Web and SQL services turned on.
I switched to another Mac, problem persisted. Updated to 10.6.8, no difference. Switched to a third Mac, no difference.
In short; It gets 1-3 Kernel Panics per day.
I have noticed that the CPU load slowly rises until it panics.
So during this weekend I turned off all services except Mail. It worked very good during the weekend. Today 1500 (15pm) I turned on Web services, and after that the CPU load started to rise...
Among the processes I found more than 300 perl processes owned by the _www user. As well as the clamavd (owned by amisvd if I remember correctly) eating a lot of memory.
Clamavd is the anti virus and spam processes, right? I have tried to turn them off in the OS X Server admin app. It won't turn off.
Regarding the Perl processes I really don't know where that is used. The info panel doesn't give me any idea. I think it means that one of the sites (I have about 20) is using perl, but I don't know which one.
So, some questions:
- Is it safe to upgrade to OS X El Capitan Server? Should I?
- How can I kill all Perl processes at one time? (I have googled this but couldn't find any working tips)
- Any idea of what's going on?
As you may tell I'm not very skilled with Apache, but I still think it's funny and educating to do this.
Graph
Perl processes
How can you kill all Perl processes at one time? killall is available on OS X. Try
killall -9 perl
HTH
btw - my apologies to ThisSuitIsBlackNot -- I see he referred to this in his comments.

Throttling respawn - Error message in Console.app

I'm getting this error message every 10 seconds.
2011-02-09 05.54.37 com.apple.launchd.peruser.501[153] (com.mysql.mysqld) Throttling respawn: Will start in 10 seconds
I'm running OS X 10.6.6.
Anyone knows what the problem may be and how do solve it?
This is a situation that's been around in Unices for donkey's years. Your program is exiting immediately as soon as it is invoked, leading to it be restarted over and over by launchd. launchd has noticed this and stopped respawning the program. The standard advice on this goes back many years, too: Find out why the daemon process is immediately exiting rather than running, and fix the cause of that. (It's usually a daemon misconfiguration of some kind.)
Yes, technically, in Mac OS 10 speak this is an "agent" rather than a "daemon", but that doesn't change either the nature of the problem or what you have to do to fix it.
http://web.archive.org/web/20101024201347/http://blog.sirkevi.com/files/Removing_MacOSX_software_that_are_constantly_relaunched.php
Quoting:
These following commands helped a lot
launchctl list -> shows a list of autostart services
launchctl remove com.webex.asassist
launchctl remove com.webex.taskwatcher

Resources