I've been running on a problem for about two weeks.
I Have a magento which is configured to use a memcache server.
Recently, I got to change the server storing my magento application.
I installed my new server, and just get my magento app up and running on the new server, with one change : I changed the database user and password used to connect to the database server.
I changed from userold to usernew.
This change takes place in my local.xml file.
But now, when I active the magento cache, Magento tries to connect to my database with the old username : userold.
I've tried all things :
rm -fR var/
/etc/init.d/memcache restart
killall memcached
reboot the entire server running memcached!
I still have my cache problem ! I can't get my
Where does this "userold" value is fuc*** stored ?
Any help would really be appreciated ! :)
Hugues.
telnet into the memcache instance and issue a flush_all command. Restarting the memcache server should have already flushed it, but sometimes its worth a try...
Magento uses TwoLevels backend for caching.
Cache stores to both of them.
And according to Zend's code, Magento reads from fast, and then from slow, if nothing returns.
You have to flush memcache and remove /var/cache at the same time.
start a new instance of memcache on a new port eg 11212
now specify this new port in local.xml
that should ensure that it is talking to a new instacne not the old.. or
use htop / top find find the psid of memcache and kill xxxx
Related
I have upgraded my application laravel version to 5.7 . cache driver is memcached. also i'm using docker compose with separate container for memcached, application, and webserver.
When I try cleaning cache it returns Failed to clear cache. Make sure you have the appropriate permissions.
when I change the cache driver to file it works well. Also, when I'm not running it in docker space it works well!
The problem is probably about flushing memcached. because when i try to clear it manually in my application it returns error 19 which stands for Memcached::RES_SOME_ERRORS! and I dont know what this means exactly!
p.s. and yes, I've created the data folder in storage/framework/cache directory with appropriate permissions.
Any suggestion?
I am assuming you are trying to set up a routine cronjob to clear the cache.
Try running the clear command while you're logged on in a wheel user account
sudo php artisan cache:clear
If it works, you may need to set up that cacheclear on an account with an appropriate access level for memory management tasks.
as I'm using docker i should define hosts as conatiner names.
so I defined MEMCACHED_HOST=memcached in .env file :-"
also i defined application dependency for memcached container.
I know this question has been ask quite a few times, but nothing seems to be working for me...
I really need help. I have made my entire website on my localhost, but hos do i get it up and running live? I've tried everything :( I've copied all of my files onto the live server and looked at endless tutorials, but nothings working. Can you maybe do a video about this or tell med what to do? I really don't want to start ALL OVER on creating all the pages and static blocks and so on.
You have to just change the url in database table. Run the query
SELECT *
FROM `core_config_data`
WHERE `value` LIKE 'http://%';
and change the url from localhost to live server url. Hopefully that'll work. Thanks
I guess that you already created many blocks, cms pages and did a lot customizations in backend in local system. You have to do next:
Copy your magento code completely to server.
On server, delete app/etc/local.xml
Create empty mysql database on the server
Backup your local database
Import that local database into database on server (which you created in step 3.)
Run magento site via browser
because you deleted local.xml file, magento will start installing process and ask you for params for db in server (here, enter data which you used for creation db in step 3, like db nambe, username, password,..). And that's it. Magento will make connection with that db and you will have everything you had in local.
One more thing which I forgot:
you have to change in database on field (you will change this on live database after importing local database, that means after step 5). There should be table core_config_data. Do search in that table, and wherever you find you local url like:
http://localhost/magento/
or something like that, you should change to your real domain, for example to:
http://my-magento-domain.com/
I have a CodeIgniter setup that has been running fine for the past 2 months and recently I keep getting:
CodeIgniter error- unable to connect to database using the provided settings
I've recently added a new domain that has a landing page for the database login (zPanel), but I don't see how that could have caused a problem--maybe the page keeps getting directory attacked or something, but I'm not sure.
Is there a way to check if this is the problem through logs? I'm at dead ends with this problem, as when I restart the server (DigitalOcean) it works fine again.
Really not sure. If anyone else has had a similar problem, I'd love to hear your solution.
Thanks.
I think your mysql is going down so Codeigniter can't connect to your database settings.
Please login to SSH and check processes by "TOP" comment. See what is using resources ram or cpu.
And check your mysql conf settings, be sure that everything written if its empty it will cause alot of problems.
Some example :
http://www.maxwhale.com/how-to-optimize-mysql-for-1gb-memory-vps/
I am new to symfony and am responsible for a site that I didn't build. For some reason the site is on a live server but running in dev mode. - Im not sure why??
That aside - The website keeps writing _sess files to my /tmp directory. The contents of each _sess file is exactly the same. See below:
_symfony2|a:3:{s:10:"attributes";a:0:{}s:7:"flashes";a:0:{}s:6:"locale";s:2:"en";}
Do I really need all of these files? Can anyone suggest a way of disabling this feature?
Thanks in advance
The default session storage of Symfony2 writes the session information to file(s). The location these files are written to is determined by the config parameter framework.session.save_path. The default value for this is %kernel.cache.dir%/sessions. This means that in a default installation of symfony the session files would be written to the cache directory for the environment.
However, this can be a problem as the cache directory has to be cleared each time an app is deployed, thus logging all the users out. Therefore presumably your app has been configured (most likely in config.yml) to store the session files in /tmp.
As I understand it, sessions that have expired should be garbage-collected at some point. Symfony also has some config params that affect this - see the FrameworkBundle Configuration. I don't know how much traffic your website has but obviously you do need the session files for active sessions. If you think you have a lot of expired sessions you could try tweaking the gc config params.
Alternatively, if having the session files in /tmp is specifically the problem you could relocate them (by changing the value of the framework.session.save_path) or use PDOSessionHandler to store sessions in the database.
I have this problem with symfony 1.4.20 on a web site I inherited.
It is writing files to
/var/lib/php/sessions
every second, until the server runs out of iNodes.
I've tried changing settings in settings.yml. app.yml and PHP session variables.
Nothing sees to be working though, the only way I can stop it is to change the ownership of /var/lib/php/sessions to root and that prevents any session files being created.
I am upgrading an existing magento website for 1.4 to 1.6.1.0.
I had dumped the existing database,
Copied all the required custom extension in the blank magento version 1.6.1.0
and after running the installation got the following error:
Error in file:
"/app/code/core/Mage/Customer/sql/customer_setup/mysql4-upgrade-1.5.9.9-1.6.0.0.php"
- SQLSTATE[HY000]: General error: 1025 Error on rename of './sales_flat_order' to './#sql2-3af-a7' (errno: 152)
How can I fix this issue?
Upgrading magento is very painful process. I suggest you to import-export data from old to new shop.
I just went through the same heartburn. I found that letting the page try to load until the script got an error or timed out and then trying again eventually worked. The upgrade script will attempt to start where it last stopped.
Before you do that, make a backup of you site and database. If it continually errors in the same spot, restore and try again.
These tips may help improve the odds of a quicker success:
Put the site in maintenance mode (by adding the maintenance.flag file
to the root directory) before starting.
Increase server and php timeouts by a very large amount (3-5minutes).
Cleanup temp and log database tables that you don't care about
(carefully, everybody has different needs here)
I tried several different methods and that is the only thing that worked. It took probably 10 reloads (waiting for a 3min timeout each time). In the end, everything upgraded correctly. No matter what method you choose, if you want to keep your store data, you will have to run the bulky db upgrade scripts that take forever.
I had similar issues when updating from 1.4.2 to latest.
I built a custom maintenance script included in my index.php that only allowes to access my ip. But the update process via shell replaced my index.php so it was accessible for everyone.
That was the cause that the final sql scripts where run by several clients and caused errors like "can't move table" etc. because those steps where already done.
--> Summing it up: Be sure that the site gets called only once, until the upgrade was successful!
The very best way to migrate magento in my opinion, is to import your entire db to an environment that you have your new magento. Then magento will run all scripts and updates and keep your data.
Maybe you find some problems on the upgrade scripts, but it's easier to fix them than fix the problems regarding model/eav's problems on the fly.
I have succeed by doing this on migrate from 1.4.1 to 1.8.1.