Came across a weird issue today.
Have a Drupal site, been live for a few years now, and this is actually the first time I've had to look at anything with it.
I needed to check out one of the tables in the MySQL database, anything I select for it throws a 500 Server Error popup, but does not do this for all tables.
I thought maybe a repair would do, but of course InnoDB doesn't support that, so I am at a loss to what the issue could be, and how I can get into this table to view/manually modify some records.
Can anyone help?
Related
I am developing a web application based on php/laravel. It is about to finish and we are testing it nowadays. But there is a problem with mysql table.
I have a table called follows.If someone follows another, I create a record on this table. There is no problem here but periodically records on this table is deleted and it is not triggered by user who doesn't want to follow someone. Or there is no intervention by system admin. Even more, I have 20+ tables and just follows table has this problem.
I checked my codes and I couldn't find any reason what causes this problem. I inspected mysql table on phpmyadmin and again I couldn't see anything wrong. Now Can you say 'there is something like that and causes this problem'? Or how can I debug this problem on mysql? Is it good trying to go for triggers? I need to find what is causing this problem.
There is no more I have to say, and I am about to go crazy..
Please write down what do you need to here extra that I forget to write here..
I know that's a silly question, but I've tried everything.
Project that I'm working on was maintained by many people, so it's very buggy.
Once a time, photos with random generated names are disppearing from server. Last days, db records disappear to, but mostly without any relation with other.
I've search in files for commands
unset()
and doctrine
delete()
and nothing strange found. Do you have any ideas how could it happen? Maybe it's the server problem, not the code?
I have designed a website like bit.ly, but a bit different. Written in php with mysql. When I was running it at localhost, everything seemed to work fine, pages loaded in 4.5 milliseconds, and I was as happy as a clam.
I uploaded it to the server, and users started surfing the website, and using it. Everything seemed to work fine untill the main table started reaching millions of rows.
The table is one million of rows length right now (it has to be that way), and growing. The pages that needs that table take 500ms to load... The mysql query is the next:
select link
from table
where kind = $kind and kind_idd = $kind_idd and live = 1;
It can return more than 1 link, in fact, it usually returns between 10-50 links.
The problem is that where clause. I am sure that mysql should have something to make it faster. I have been asking google and I found indexes, keys, and so on. But I couldn't find a website that explained it for dummies.. If someone could give me an example to make this thing go fast, I would really appreciate it.
Thank you!
Try using the mysql explain plan
so that you can see what is happening.
You probably need to ensure that you have indexes on kind, kind_idd and live see http://dev.mysql.com/doc/refman/5.0/en/create-index.html
We upgraded our magento 1.3.3 website to version 1.6.2.0 about three months ago. Since the upgrade our Products Ordered Report shows no history before the upgrade date, but displays all orders after the upgrade date just fine.
I have looked through all types of posts about the subject in places such as magentocommerce, Stack overflow, Google, etc... All my searches resulted in either people getting 404 errors (which I’m not experiencing) or people who are experiencing my same problem but no one seems to know how to fix it on a live site. I have spent over 3 days and countless hours searching for an answer to fixing my live sites report issue with no luck.
There are many fixes out there as long as the site is in development stages and has not gone live, such as truncing a bunch of database tables, but once the site has gone live no one seems to know how to resolve the issue
I know that for the most part EAV tables were eliminated with the upgrade and it’s possible that somehow that could be part of the problem.
Does anyone know what database table(s) the Products Ordered Report used in version 1.3.3 and if it is the same one(s) it uses in version 1.6.2.0. If they are different which table(s) where used then and what table(s) are used now for the report?
Or if you know how to resolve this issue on a live site or have a few suggestions, please don’t hold back, I need your help
Thank you in advance
The issue is most likely coming from the sales_flat_order_item table which is used to generate this report.
I had similar problem. fixed mine using phpmyadmin.
Browse the table and if you find store_id empty, edit and select the correct store_id for your store.
I run the following query to update all order items:
UPDATE `sales_flat_order_item` SET `store_id`=1;
(this is assuming you only have 1 store and its store id =1. Also, make backup before running.
I have developed a news website in a local language(utf-8) which server average 28k users a day. The site has recently started to show much errors and slow down. I got a call from the host saying that the db is using almost 150GB of space. I believe its way too much for the db and think there something critically wrong however i cannot understand what it could be. The site is in Drupal and the db is Mysql(innoDb). Can any one give directions as to what i should do.
UPDATE: Seems like innoDb dump is using the space. What can be done about it? Whats the standard procedure to deal with this issue.
The question does not have enough info for a specific answer, maybe your code is writing the same data to the DB multiple times, maybe you are logging to the table and the logs have become very big, maybe somebody managed to get access to your site/DB and is misusing it.
You need to login to your database and check which table is taking the most space. Use SHOW TABLE STATUS (link) which will tell you the size of each table. Then manually check the data in the table to figure out what is wrong.