i have a problem with taking magento backup (both system, database and db + media backup). When taking backup everything seems to be working, but when finished the backup does not appear on the backup site or Var/backup.
First i tought the problem was memory limit since the webshop is big, but increasing the memory limit to 256m didnt solve the problem (http://dreamaquarium.no/nettbutikk/php.ini)
I was also thinking the problem was permissions in the backup folder, but does not seems like that is the problem (what permission should i use?).
When i accessed the backup folder i found a .htaccess with the following content: deny from all. I deleted the .htaccess, and ran a backup - and it didnt seem to fix the problem.
Sooo any suggestions how to make the backup work?
i had the same problem with my magento shop. The the reason was a combination of to low memory limit and execution time.
So i suggest you to do the following:
max_execution_time = 360;
memory_limit = 512M
Also set max_allowed_packet to 500M in my.ini/my.cnf fil under[mysqld] .
Regards, S.T
Related
I am getting errors on my website and my website inodes count is overload. The hosting inodes limit is 200,000 but my website inodes count is 909,496 and I can't even open phpMyAdmin. The hosting support asked me to remove unused files. How can I decrease the inodes count and which files are unused in Magento based website?
Usually an indicator that you need a more capable hosting provider.
The major places that Magento creates files during operation are in the var/ folder and your product image cache.
If you've never checked before, the following areas can accumulate a phenomenal amount of detritus. Using an ftp client, check the following areas in your var/ folder:
Check that you don't have a bazillion sessions files in var/session, remove anything older than current date
Check that there aren't an excessive amount of files in var/report, you might want to find out why Magento is generating them and fix the issue. Delete them all.
Logging will generate over time several huge files in var/log, delete them and then look at the new ones to find out what errors are being generated.
Imports and other stuff can cause temporary files to accumulate in var/tmp, delete them. Also check in var/import for old imports that can be deleted
Stored database backups are kept in var/backup, using the admin backend System > Tools > Backups:
Download the latest database backups to a local workstation and delete all backups.
Magento uses a lot of caching to store information, the biggest will be the Image Cache if you have a large catalog, and it will contain cached images from the beginning of time, and lots of useless ones if you've deleted product over time. Using the Admin backend, go into System > Cache Management:
Clear the Magento Cache.
Flush Catalog Images Cache.
Magento does not delete product images when you delete product. In fact Magento would be a prime candidate for appearing on one of those Hoarder programs that were prevalent on TV there for a while.
After you get the site working, consider installing ImageClean.
Hopefully this will have reduced your inode count enough to carry out the following operations. Before proceeding, do a couple database backups and store off server!!!
Next step is to ask your hosting provider if they include your database in that inode table count. If they do, you are kind of stuck as Magento uses innodb and likely, they've cheaply not set up MySQL to use files-per-table so you can resize the innodb file size by optimizing each table. Ask them if they use files-per-table when they set up MySQL, if they don't know what it is, develop that sinking feeling in the pit of your stomach.
Some tables that get excessively huge, especially if you've haven't properly set set up the Magento master cron job trigger in your cPanel and checked to make sure log table cleaning is enabled in System > Configuration > Advanced > System > Log Cleaning. These tables are as follows:
'dataflow_batch_export',
'dataflow_batch_import',
'log_customer',
'log_quote',
'log_summary',
'log_summary_type',
'log_url',
'log_url_info',
'log_visitor',
'log_visitor_info',
'log_visitor_online',
'index_event',
'report_event',
'report_viewed_product_index',
'report_compared_product_index',
'catalog_compare_item',
'catalogindex_aggregation',
'catalogindex_aggregation_tag',
'catalogindex_aggregation_to_tag'
Magento has a built-in script to clean the logs. If running this crashes with a memory error because you've never set the cron job up and there's too much bloat to clean out, Crucial Web Host has a script that can be run to manually delete all log file contents. including the dataflow tables which won't be cleaned out by the Magento log cleaning process. If you use dataflow import/export a lot, Nexcess has a script that can check on the dataflow tables size and clear them as well.
After cleaning the database, you will need to use phpMyAdmin to optimize each table in your Magento database. If the hosting provider hasn't set up files-per-table in MySQL, it will do squat for reducing your inode count.
After all that, don't bother messing with deleting application files or anything else Magento uses. It doesn't really accumulate that much aside from the var/ folders and the Image cache and you likely will end up with a dead website.
At this point, you're at the mercy of a shared server hosting plan that has decided to be fair to everyone by limiting what can be done in each account and doesn't allow enough resources to run Magento. Start looking for a hosting provider that supports Magento, often they don't bother limiting your inode count (a cheap trick to allow too many people to share a hard drive) as they offer plenty of disk space for you to run your e-commerce website.
I created a joomla site on my shared hosting this morning. Everything was going great, I was uploading content. And suddenly when I went to create my third category, I got the following error:
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 32 bytes) in /home/mysite/public_html/libraries/phputf8/utils/unicode.php on line 208
I tried max_execution in a custom php.ini but it has still not helped me.
I am unable to contact my hosting company as they do not have a support forum or anything.
Is there any way to repair this issue?
#Dasun is right, 32 mb is an awful lot of memory:
turn the debug feature on (administrator -> global configuration -> system -> debug system) and you'll see who's eating up so much memory. If you can't get rid of the module/component, try to enable cache with a long timeout.
And definitely change hosting provider as soon as possible!
Yep get a new host — how they function without a means of contacting them is beyond me.
The error is saying that you've only got a 32Mb allowance for PHP to run in and when PHP tried to allocate more than that it failed.
You could try increasing the setting for PHP in a site based php.ini file. e.g.
memory_limit=64M;
Or, if a local php.ini doesn't work you could try adding in this to the top of your .htaccess (assuming you're on a LAMP server)
php_value memory_limit 64M
If your host allows it this will override the memory_limit setting for just that site.
I just had a customer with a very similar problem. They have a cPanel site, where the default memory allotment was set as 32M. I found another forum where they suggested adding the line below to both the index.php in the Joomla home space, and also in the index.php file in the administrator folder. Worked like a charm. I added it directly below the opening php tag.
ini_set('memory_limit','64M');
This answer was found at http://www.robertwent.com/blog/joomla/19-joomla-increase-php-local-memory-limit-without-changing-server-settings
Hope it works for you
(this is my first "answer" on this site ... apologies if I've not answered in the the site's official way)
How to setup cron job for clear cache and re-indexing in Magento. i don't know how to set the cron for re-index. but i saw some where every day cron runs defaultly in magento. still i am facing re indexing issues in my site. i need to clear cache also.On Magento website here
they said that logcleaning and reindexing is commented out in the code so in which file I can un-comment to setup cron job fo log cleaning and reindexing?
thanks,
murali.
To create the cron job, add the following to your cron file to reindex every day at 6am
0 6 * * * php -f /shell/indexer.php reindexall
Note: If you get an error telling you you’re out of memory similar to:
PHP Fatal error: Allowed memory size of 262144 bytes exhausted (tried to allocate 7680 bytes) in …/app/code/core/Mage/Index/Model/Indexer.php on line 163
Try commenting out php_value memory_limit and php_value max_execution_time in your .htaccess file.
I have tested my solution in my cPanel 11.52.2.4. So stay calm and do following:
Navigate to your magento2 admin area. And click over System > Index Management.
From the Actions drop down select Update by schedule and click on submit.
That is it from admin section. Now navigate to the cPanel area and do following-
Login to your cPanel
Under cPanel click on Cron Jobs under Advanced tab group
If you have already created a cron job, you can edit it, or create a new cron job.
Select the frequency to run the cron job, suppose Once per week (0 0 * * 0).
Write the command to re-index the data, as
php-cli /home/username/public_html/sub_folder_if_any/bin/magento indexer:reindex
Save it. As per your schedule frequency, the cron job will run.
If you want lesser frequency, but note that if you put less frequency it will consume the resource.
Note: Make sure you replace <username> with your cPanel user name and /<sub_folder_if_any> as per your magento2 installation directory. If you are not using any sub directory just ignore it
We've the same problem and fixed change Megabytes to Bytes.
instead of set memory_limit 1024M we changed to 1073741824.
Looks like an issue at server... We're hosted at Media Temple using Plesk Panel
Hope you sorted it out sooner.
Regards
I wants to upload 6MB image in the products of the magento store. Please help me where i have to change my maximum limit ? This code did not work in php.ini file
upload_max_filesize = 10M
post_max_size = 10M
Any suggestion would be appreciable
Typically the server process (apache, httpd or php-cgi) needs to be restarted after making changes to php.ini. This might be why you are not seeing any difference.
Another way is to put your upload_max_filesize and post_max_size settings in a .htaccess file in the root of your Magento directory. Apache tends to read that more often.
Are you getting an error when you upload the file, or does it just time out? It might be that the dimensions of the image (say 4,000 x 5,000) are too big for scaling/cropping.
Place a file in your root with in it and call it phpinfo.php. Now go to http://www.yoursite.com/phpinfo.php and see what the maximum upload size is.
If you are on shared hosting it may not be possible to increase your php settings beyond what your hosting provider allows. This could be the reason why your settings are not taking hold. Run phpinfo.php and take things from there.
I've just moved my Magento site to a new server and I'm trying to re-index my store using the Index Management.
I check all the boxes and re-index and I get the following:
Cannot initialize the indexer process.
I've looked at resetting the file permissions using the Magento Cleanup tool. But nothing I've tried seems to work.
Has anyone ever come across this before and how did they get past this?
Many thanks
I don't have any idea why you can't do it from the Index Management, but as a temporary solution, I would advise to use indexer.php script from the cmd line:
php /var/www/magento/shell/indexer.php reindexall. You can also run it by the system cron periodically, it should do the trick for a while.
delete files from var/locks and change permission of folder to 755, it will work..if donot have any issue with Dataseb files