GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Mysql --open-file-limit-100000 (https://gfy.com/showthread.php?t=1266916)

porn-update 06-10-2017 08:53 AM

Mysql --open-file-limit-100000
 
Hello to all,
In the last few days, my servers have been limited because they consume too much cpu.
Looking for some problem I found this:
http://porn-update.com/temp/Schermat...2017-42-19.png

But what is this?

Is a server problem?
Is my problem?
Are 100,000 open files or the weight of a file?
Do I have some queries, somewhere that requires 100,000 rows?
Could this be?
Code:

$db->query("ANALYZE TABLE ".$prefix."photo");
Am I in shit? Can I fix it?

How?

magneto664 06-10-2017 09:03 AM

We have 2017 year, I don't understand why people still use fake hosting companies like hawkhost or hostgator where you have a hard memory or open file limit.
get proper hosting - stupid VPS cost 3-4 buks per month

porncrash 06-10-2017 09:55 AM

can you give some more info's about your hardware?

porn-update 06-10-2017 10:11 AM

Quote:

Originally Posted by magneto664 (Post 21825430)
get proper hosting - stupid VPS cost 3-4 buks per month

What and where?

Quote:

can you give some more info's about your hardware?
https://www.hawkhost.com/semi-dedicated-hosting, Nestling

I asked more info on cpu, they did not answer me, they just say you have 2 cpu

tomash999 06-10-2017 03:28 PM

Quote:

Originally Posted by porn-update (Post 21825559)
What and where?


I asked more info on cpu, they did not answer me, they just say you have 2 cpu

Look for the post "Some good servers?" on this forum, there are good answers. I think that people talks about shared hosts here only because they are affiliates, but if you plan any type of adult website you should take at least 1GB VPS (~10$/month on average), nothing will work well below it.

porn-update 06-11-2017 08:17 AM

He he, I opened that post ... :winkwink:

Where did you find a vps at $ 10 per month?

Denny 06-11-2017 09:14 AM

Quote:

Originally Posted by porn-update (Post 21826861)
He he, I opened that post ... :winkwink:

Where did you find a vps at $ 10 per month?

Some people assume everyone is a server admin so they automatically suggest unmanaged hosting plans.

You can get a VPS for that price but it's unmanaged so you need to know how to manage a server.

porn-update 06-11-2017 03:43 PM

What do you mean to admin a server?

Some time ago I tried with digitalocean, centos and CWP (centos web panel), but honestly I did a lot of effort to get more or less the same results as a hosting or a shared server.

wankawonk 06-12-2017 05:24 PM

This is what happens when you try to run porn websites without knowing anything about how to run websites

tomash999 06-12-2017 06:03 PM

@porn-update yes, @denny is correct, I assumed that you know how to setup a server.

Managed services will cost 25$+/month, and many companies that offers VPS, have a managed service too, except those with the lower pricing.

If this is for any kind of website with membership, you should not choose a shared host, but a managed one.

bigalownz 06-13-2017 10:47 PM

Quote:

Originally Posted by porn-update (Post 21825559)
What and where?



https://www.hawkhost.com/semi-dedicated-hosting, Nestling

I asked more info on cpu, they did not answer me, they just say you have 2 cpu

see me sig for a vps

price start as low as $2.50 a month

i changes from a shared / semi dedicated hosting to a vps and never looked back

Barry-xlovecam 06-20-2017 09:07 AM

https://stackoverflow.com/questions/...-analyze-table

https://dev.mysql.com/doc/refman/5.7...yze-table.html

You are perhaps locking the tables and using up your memory allocation. That is from a script you wrote?

porn-update 06-20-2017 03:55 PM

There is an analyze table in my code, but it is only used once a week in cronjob

http://porn-update.com/temp/Schermat...1 00-51-56.png
Mysql certainly consumes a lot of resources, but some tables now have almost 1 million rows

Barry-xlovecam 06-21-2017 10:17 AM

I have a database table with 4.5 million rows running locally on a 4 core LINUX MySQL
Code:

mysql> select count(*) from xvideos;                                            +----------+
| count(*) |
+----------+
|  4543335 |
+----------+

1 row in set (0.00 sec)

mysql> ANALYZE TABLE xvideos;
+-------------+---------+----------+----------+
| Table      | Op      | Msg_type | Msg_text |
+-------------+---------+----------+----------+
| seo.xvideos | analyze | status  | OK      |
+-------------+---------+----------+----------+
1 row in set (0.01 sec)

I am using a terminal not an interpreter code. Who wrote the code? I think the code may be the issue?

**added

Code:

mysql> SHOW CREATE TABLE xvideos;
.....
  KEY `category` (`category`(10)),
  FULLTEXT KEY `idx_1` (`category`),
  FULLTEXT KEY `idx_2` (`tags`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1

1 row in set (0.00 sec)

See whats there ... and what you are indexing.

Your alternatives are to fix whatever the issues are or to just buy more CPU time. In other words bad code can be remedied with more hardware -- not really recommended but... If that ANALYZE locks the tables too long your users will get no return from the db. So, if it's fast and dirty, just pay for the spike in CPU and move on.


All times are GMT -7. The time now is 03:18 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc