Limiting Cpu/memory Of A Single User/domain In Whm
Jan 21, 2008
i've been researching this but can't seem to find a decent solution.
basically trying to limit the cpu usage of a single domain, or limit accesses per hour if that's possible?
i tried adding an entry in /etc/security/limits.conf which restricts numproc to 2 and then down to 1, but it doens't seem to make any impact on the load. load of the server drops from about 1.5-2 down to 0.02 when this single site is suspended, and i can't have it run wild.
ideally would like a message that says something along the lines of server is too busy... trying again in 5 seconds or something along those lines?
I've been unable to limit the size of a process to keep it from hosing a system. I've tried the following methods:
- RLimitMEM for just Apache (although I'd like this to apply to any process in the system) - ulimit - PAM limits.conf (/etc/security/limits.conf)
In theory, either ulimit or limits.conf should do the trick, but when I start up Apache and run a test script to build up some memory, it doesn't get killed off. Is there any way to do what I want? I'll even take kernel modification as an option. We're running CentOS 4.4, but I don't have a problem with swapping out for another kernel.
I have a VPS with 256MB ram. i want to limit mysql memory access. suppose i want that mysql should not use more than 128MB ram. is this possible? if yes how?
I am interested in setup user activity limits to avoid peaks on the server load, I have readen a lot about PAM and limits.conf but still have no idea on how set this limits. Most of the examples are similar to this page http://www.seifried.org/lasg/users/ but they are still confusing to me
>> I would like to setup rules like this:
Customers may not use more than 2% CPU daily, 3% memory daily, run more than 10 simultaneous processes per user, allow any process to run for longer than 30 CPU seconds, run any process that consumes more than 20% of available CPU at any time, or run any process that consumes more than 16 MB of memory.
I thought I knew enough about my .htaccess stuff to do this, but I can't seem to work it out. What I want to do is if a user visits domain.com/folder, we check to see if the folder exists. If so, show as normal (IE domain.com/support)
If a user visits domain.com/dynamicusername (dynamicusername is not a physical folder), redirect to dynamicusername.domain.com
I may have this wrong, but I think it's possible. I have a friend who wants to run a process on one of my servers, now I don't particularly 'care' about this server, it's just used for a couple of unimportant things so I'm okay with him running it, but I don't want the hassle of sorting out things if he decides to delete everything, so I'm hoping it's possible to limit his directory.
For example, I have the folder "people" in the top most directory, inside that I have "arthur", I want to limit the ssh user "arthur" to the folder "arthur", I don't want him to be able to cd ../../ and delete stuff, is this possible?
I have a user who says he cannot get to any site on my server from either home or work. He has been a user for many years, and has never had any problems. He has also checked with his IT at work and they confirmed the site is not available. He is computer savvy, so I trust he is telling the truth.
His work and home are only 10 miles apart.
Do you guys have any ideas what could be happening? Is there a DNS entry wrong somewhere? He can't access the site even when putting in the IP address.
There is one other user reporting something similar but other than that no other complaints. The site works fine for everyone else.
I tracked down another issue that I am having with this same server. I login and look at the system and 100% of the swap is used and 99% of the Ram. I look to see who's using it, and the user name is Nobody. What role does this user play in cpanel? Can I disable the user?
All will be hosted on the same server (same IP) and I want all to be secured, through a SIGNED certificate, not a self signed. I assumed that wildcard ssl would be fine for this, but I just took a look and it's only for subdomains: example.example.com hello.example.com.
Is there any way of having every subdomain and domain secured, using ssl, through one certificate? I don't want to have to buy individual certificates for every domain, that'd be... expensive.
I don't really now how this can be done, but as far as I can remember when I was in shared hosting, they always complaint about memory usage.... but they always know what specific files were cosing the most load on the server.
So, I remember I have this count.php file that was constantly hited and the complaint and tell me exactly what file it was cosing the heavy load.
This is just an example, but looks like they always knew the specific files that were cosing problems, so what the hell, this can be done!
Now that I have my own server I would like to know these things as well, so I can know what files need to be optimized.
I searched and searched and searched and... OK, you'll get the point, and I just HAVE NOT find any information on this.
Can someone tell me this "secret"? What do you use to get the files that are cosing the most heavy load on a Linux server?
In the past WHM gave us the chance to check the hosting accounts daily cpu, memory and mysql usage in server status, but on the new WHM/CPANEL releases we noticed that this values are not so precise as they were.
Anyone know how can be found the average use of cpu/memory/mysql of each hosting account letting the hosting companies understand who uses more resources?
I am currently running Apache on Ubuntu 14.04. I tried adding an alias, but it doesn't do exactly what I need. I have a single site and I need to point two domain names to it. The thing is, if someone types in www.site1.com I want it to show the url as www.site1.com and if someone types in www.site2.com I want it to continue to show www.site2.com in the URL. Right now if they type in www.site1.com it shows the first site name as the URL, but if they type in www.site2.com it changes the URL to www.site1.com. Below is what I have as my virtual host in my conf file currently.
I have one valid commercial Comodo certificate. It is correctly installed and works fine on my 443 port when I go to https://www.domain1.com
However, I have quite a few other virtual hosts that also work fine on my port 80 when I go to http://www.domain2.com then http://www.domain3.com and so on.
Now out of curiosity I have typed https://www.domain2.com and it picked up the SSL certificate from my first domain1.com when it wasn't supposed to (I guess)! It reported an error but worked! Then I tried all my other domains 3,4,5 and so on and the issue repeated.
How do I keep this single certificate to the only domain name it belongs to? It has no wild cards and is valid for only one domain name I bought it for. The example of my hosts' configuration is below:
<VirtualHost *:80> DocumentRoot "/directory/home/place" ServerName domain1.com <Directory "/directory/home/place"> allow from all Options +Indexes </Directory> ServerAlias www.doamin1.com </VirtualHost>
Plesk Panel 11.5.30, on Centos 5.10. I have 2 'domains' running on the same ip; sub.mysite.com and mysite.com. I need to add SSL to sub.mysite.com.
From the documentation, [URL] ...., it appears that if the user is using a SNI compatible browser a single SSL certificate for sub.mysite.com should work (as I am using a linux server, SNI is enabled by default I believe).
However, the control panel for the domain (website & domains > hosting settings) states that "To employ SSL, move this site to a dedicated IP address, install an SSL certificate on the site, and then select it below." In addition, other documentation makes reference to a "Secure your sites" link on the control panel to implement a purchased SSL certificate, which is not visible to me - I presume because the domain is not on a dedicated ip address.
Can someone confirm that; a) a SSL certificate for sub.mysite.com on a shared ip will work. b) that the SSL for sub.mysite.com would managed at the server level (Server Management > Tools & Settings > SSL Certificates) rather than the domain's control panel.
One alternative may be to purchase a wildcard SSL certificate (*.mysite.com). This post [URL] .... suggests that this would work. However, this is a more costly option and does more that I need (i.e. delivers SSL for all domains).
I could also purchase a dedicated ip address for sub.mysite.com. I have no experience of moving domains within plesk from a shared ip to a dedicated ip. Is this a straightforward process?
I have a problem where all email sent from uaccb.edu (studentmail.uaccb.edu [208.190.226.130]} is not arriving at my VPS. The people sending email from the above domain are not getting any errors, it is not being marked as spam, it is just being blackholed somehow.
I have checked the above IP and domain, and can't find it on any blacklist, and I am using pretty standard cPanel setup on my VPS. I have spam set to be marked and receive a fair amount and have it autorouted to a folder rather than auto-deleted.
From uaccb.edu, the only thing I have access to is Outlook Web Access to send test emails, and they are sent fine with no errors returned. If I send test emails to gmail and other similar email accounts, they go through fine, the only problem is to ANY domain hosted on my VPS. I have even recently transferred all the domains to a second VPS (with the same hosting company) at a different datacenter (for different reason) and the problem persists.
Is there any WHM setting or any ideas on how to troubleshoot this?
I'm running postfix 2.3.5 with my alias info being drawn from a mysql database.
What i'm trying to do is setup a partial catchall setup to forward all email that's addressed *@hah.cx to uber@spamcop.net. However, I want email addressed to mikey@hah.cx, and mike@hah.cx to be directed to my local "mikey" user email account.
I am using Plesk 12.0.18 Update #51 on Ubuntu 14.04.2 LTS.
I want to restore a single Domain from Plesk GUI but it failed:
Archiver error: from /private-backup/plesk/clients/WSKunde/domains/domainname.de/backup_domainname.de_conf_1506200200.tgz: forkExecvPipes: execv() failed: No such file or directory System error 2: No such file or directory Warning: domain "domainname.de"
Outlook 2013 complains about the SSL certificate when using email. Installing the certificate still doesn't stop the error/warning. What are my options?
Can I install on the plesk server a self-signed SSL cert and avoid the issues? Can I buy & install a single certificate for that one domain and resolve the issue but not affect others. Do I need to buy a SAN certificate for the whole server?
I have hired two servers for plesk and I have the mail configured in one server and the website in another one, it all seems to work fine except for a problem.
When the server where the website is tries to send a message through a smtp account it canĀ“t send it, it seems to be looking for the mail server in the same server where the website is instead of look for it in the other server.
I have one domain where is hosted a lot of subdomains,and for some reason it constantly have 4% cpu usage and 33% mem usage.Since that domain is inactive,could be that usage beacuse of addon domains but it simply not presented correctly in whm?