Search Results

Search found 310 results on 13 pages for 'memcache'.

Page 3/13 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Memcache localhost connection oddity

    - by MatW
    When I try to connect to memcache using this code: $memcache = new Memcache; $memcache->connect('localhost', 11211) or die ("Could not connect"); The call dies with the "Could not connect" error, but if I use localhost's IP: $memcache = new Memcache; $memcache->connect('127.0.0.1', 11211) or die ("Could not connect"); It works! So what's my problem? Well, this new computer is the only development environment I've setup that's been sensitive to that difference. I'm not about to go changing the settings on any code for what seems to be a computer specific issue, but I can't figure out what could be causing this behaviour... Any ideas? I'm running XP, memcached 1.2.4, and wampserver 2. I've checked the hosts file and it does have an entry for localhost.

    Read the article

  • Potential issue when using memcache session save handler in PHP

    - by Sean
    I have two load balanced web servers, and I'm using the memcache session save handler with the save path pointing to two memcache servers. It's configured with session redundancy set to two (the number of memcache servers). So PHP is writing session data to both memcache servers, and when I take one of the servers down, everything seems to work fine since the session data has been written to both memcache servers. The problem seems to happen when I use the app for a while with only the one memcache server up, and then bring the other one back up. My theory is that the memcache server comes back up, and PHP then starts asking it for session data which isn't there since it was written to the other server while this one was down. Is there any merit to this theory? Should PHP be asking both servers for the session data and maybe there's some other problem?

    Read the article

  • Using memcache to store obj's in google app engine.

    - by fredrik
    Hi, I'm trying to use memcache to cache data retrevied from the datastore. Storing stings works fine. But can't one store an object? I get an error "TypeError: 'str' object is not callable" when trying to store with this: pageData = PageType(page) memcache.add(memcacheid, pageData, 60) I've read in the documentation that it requires "The value type can be any value supported by the Python pickle module for serializing values." But don't really understand what that is. Or how to convert pageData to it. Any ideas? ..fredrik

    Read the article

  • Memcache won't flush or clear memory

    - by pedalpete
    I've been trying to clear my memcache as I'm noticing the storage taking up almost 30% of server memory when using ps -aux. So I ran the following php code. $memcache = new Memcache; $memcache-connect("localhost",11211); $memcache-flush(); print_r($memcache-getStats()); This results in the output of ( [pid] = 4936 [uptime] = 27318915 [time] = 1255318611 [version] = 1.2.2 [pointer_size] = 64 [rusage_user] = 9.659531 [rusage_system] = 49.770433 [curr_items] = 57864 [total_items] = 128246 [bytes] = 1931734247 [curr_connections] = 1 [total_connections] = 128488 [connection_structures] = 17 [cmd_get] = 170288 [cmd_set] = 128246 [get_hits] = 45464 [get_misses] = 124824 [evictions] = 1009 [bytes_read] = 5607431213 [bytes_written] = 1806543589 [limit_maxbytes] = 2147483648 [threads] = 1 ) This should be fairly basic, but clearly, I'm missing something.

    Read the article

  • PHP Extension (memcache|memcached) not showing in phpinfo() but showing in php -m and php -i?

    - by Auston
    I am getting both modules listed as installed / configured when I use: php -m or if I use: php -i but when I use: $m = new Memcache; // or $m = new Memcache(); // or $m = new Memcached(); //or $m = new Memcached; I get the following error: Fatal error: Class 'Memcached' not found I am running on a Mac - OS X (10.5.7) with default install of apache & php. Additionally, I have memcached running as a daemon on 127.0.0.1:11211 and libmemcache as required by the php-memcached library. I have restarted apache tons of times and even done a machine restart. Does anyone know why the modules/extensions show up in the command line but not in my phpinfo()? I am literally stumped, after 3 hours of googling, I am just about ready to give up.

    Read the article

  • Memcached server: Is it a good practice to point two server urls to the same server?

    - by Niro
    I have a system where there are connections to a memcache server from several different files and servers. I would like to stay with one server but keep the option of increasing the number of memcache servers (for periods of of high traffic). My idea is to tell memcache there are two servers, while the two urls will point (by DNS) to a single server. In the future if I want I can add a server and change DNS without changing the code in many places. Is this a good practice? Is there a performance cost to the fact that there are two server connections but they both point to the same server? Any other idea how to achive instant expeandability of memcache capacity without need to change the code and deploy ?

    Read the article

  • (Google AppEngine) Memcache Lock Entry

    - by Friedrich
    Hi, i need a locking in memcache. Since all operations are atomic that should be an easy task. My idea is to use a basic spin-lock mechanism. So every object that needs locking in memcache gets a lock object, which will be polled for access. // pseudo code // try to get a lock int lock; do { lock = Memcache.increment("lock", 1); } while(lock != 1) // ok we got the lock // do something here // and finally unlock Memcache.put("lock", 0); How does such a solution perform? Do you have a better idea how to lock a memcache object? Best regards, Friedrich Schick

    Read the article

  • Get expiration time of a memcache item in php?

    - by Jonatan Littke
    Hey. I'm caching tweets on my site (with 30 min expiration time). When the cache is empty, the first user to find out will repopulate it. However, at that time the Twitter API may return a 200. In that case I'd like to prolong the previous data for another 30 mins. But the previous data will already be lost. So instead I'd like to look into repopulating the cache, say, 5 minutes before expiration time so that I don't lose any date. So how do I know the expiration time of an item when using php's memcache::get()? Also, is there a better way of doing this?

    Read the article

  • memcache fast-cgi php apache 2.2 windows 7 creating problems

    - by Ahmad
    hi, i am trying to run memcache, fast-cgi with apache 2.2 + php on a windows 7 machine. if i dont use memcache everything works fine. the moment i disable extension=php_memcache.dll in php.ini everything returns to normal. once i start apache, the apache logs say: [Wed Jan 12 18:19:23 2011] [notice] Apache/2.2.17 (Win32) mod_fcgid/2.3.6 configured -- resuming normal operations [Wed Jan 12 18:19:23 2011] [notice] Server built: Oct 18 2010 01:58:12 [Wed Jan 12 18:19:23 2011] [notice] Parent: Created child process 412 [Wed Jan 12 18:19:23 2011] [notice] Child 412: Child process is running [Wed Jan 12 18:19:23 2011] [notice] Child 412: Acquired the start mutex. [Wed Jan 12 18:19:23 2011] [notice] Child 412: Starting 64 worker threads. [Wed Jan 12 18:19:23 2011] [notice] Child 412: Starting thread to listen on port 80. and after accessing the page [the page just has echo phpinfo()]. i get this error in the error.log [Wed Jan 12 18:20:54 2011] [warn] [client 127.0.0.1] (OS 109)The pipe has been ended. : mod_fcgid: get overlap result error [Wed Jan 12 18:20:54 2011] [error] [client 127.0.0.1] Premature end of script headers: index.php i have php_memcache.dll in my ext directory and httpd.conf is like this: LoadModule fcgid_module modules/mod_fcgid.so FcgidInitialEnv PHPRC "c:/php" FcgidInitialEnv PATH "c:/php;C:/WINDOWS/system32;C:/WINDOWS;C:/WINDOWS/System32/Wbem;" FcgidInitialEnv SystemRoot "C:/Windows" FcgidInitialEnv SystemDrive "C:" FcgidInitialEnv TEMP "C:/WINDOWS/Temp" FcgidInitialEnv TMP "C:/WINDOWS/Temp" FcgidInitialEnv windir "C:/WINDOWS" FcgidIOTimeout 64 FcgidConnectTimeout 32 FcgidMaxRequestsPerProcess 500 <Files ~ "\.php$>" AddHandler fcgid-script .php FcgidWrapper "c:/php/php-cgi.exe" .php </Files> so the problem has to be related to memcache coz if i disable it, fast-cgi seems to be working fine. any possible reasons for this?? the memcache service is running.. i can check it through control panel-services

    Read the article

  • how can I effect DNS Caching on PHP/Memcache application

    - by Niro
    In a very high loaded Ubuntu/PHP web server I found that the PHP line: $memcache-connect("int-aws_ec2.memcached.myapp.net",11211); sometimes takes ~5 secs. Replacing the url with the ip address decreases the server load from ~20 to 0 My question is - where are the settings that effect the DNS caching for this? Is it in the server level or the memcache library ? How can I change it ? Additional info: Ubuntu 10.04 lucid PHP: 5.3.2-1ubuntu4.10 Apache/2.2.14 (Ubuntu) Amazon EC2 Even more info per Celada's comment: The DNS handling for the memcache server is done by scalr (the platform I use to manage the cloud resources). They have a client located on the instances and their own DNS servers. /etc/nsswitch.conf - hosts: files dns /etc/resolv.conf: nameserver 172.16.0.23 domain ec2.internal search ec2.internal The domain is not in hosts.conf To check if I run nscd I used /etc/init.d/nscd stop and received 'no such file' so i guess I dont run nscd. Thanks !

    Read the article

  • How can I best implement 'cache until further notice' with memcache in multiple tiers?

    - by ajreal
    the term "client" used here is not referring to client's browser, but client server Before cache workflow 1. client make a HTTP request --> 2. server process --> 3. store parsed results into memcache for next use (cache indefinitely) --> 4. return results to client --> 5. client get the result, store into client's local memcache with TTL After cache workflow 1. another client make a HTTP request --> 2. memcache found return memcache results to client --> 3. client get the result, store into client's local memcache with TTL TTL = time to live Is possible for me to know when the data was updated, and to expire relevant memcache(s) accordingly. However, the pitfalls on client site cache TTL Any data update before the TTL is not pick-up by client memcache. In reverse manner, where there is no update, client memcache still expire after the TTL First request (or concurrent requests) after cache TTL will get throttle as it need to repeat the "Before cache workflow" In the event where client require several HTTP requests on a single web page, it could be very bad in performance. Ideal solution should be client to cache indefinitely until further notice. Here are the three proposals about futher notice Proposal 1 : Make use on HTTP header (current implementation) 1. client sent HTTP request last modified time header 2. server check if last data modified time=last cache time return status 304 3. client based on header to decide further processing GOOD? ---- - save some parsing for client - lesser data transfer BAD? ---- - fire a HTTP request is still slow - server end still need to process lots of requests Proposal 2 : Consistently issue a HTTP request to check all data group last modified time 1. client fire a HTTP request 2. server to return last modified time for all data group 3. client compare local last cache time with the result 4. if data group last cache time < server last modified time then request again for that data group only GOOD? ---- - only fetch what is no up-to-date - less requests for server BAD? ---- - every web page require a HTTP request Proposal 3 : Tell client when new data is available (Push) 1. when server end notice there is a change on a data group 2. notify clients on the changes 3. help clients to fetch again data 4. then reset client local memcache after data is parsed GOOD? ---- - let the cache act/behave like a true cache BAD? ---- - encourage race condition My preference is on proposal 3, and something like Gearman could be ideal Where there is a change, Gearman server to sent the task to multiple clients (workers). Am I crazy? (I know my first question is a bit crazy)

    Read the article

  • PHP callback function not being called

    - by Industrial
    Hi everyone, I've got the following code: function _callback_memcache_failure($host, $port) { print "memcache '$host:$port' failed"; } $this->memcache = new Memcache; $this->memcache->addServer('192.168.1.35', '11211', 0, 50, 10, TRUE, _callback_memcache_failure('192.168.1.35','11211')); The server is online and running (verified!), but the Failure callback function is being called at each connection. Why is that? Reference: PHP documentation: Memcache::addServer - failure_callback Allows the user to specify a callback function to run upon encountering an error. The callback is run before failover is attempted. The function takes two parameters, the hostname and port of the failed server .

    Read the article

  • Super strange PHP error

    - by Industrial
    Hi everyone, When trying memcache:get, I'll get the following error message back: Message: Memcache::get() [memcache.get]: Server localhost (tcp 11211) failed with: Failed reading line from stream (0) I run a Windows 32bit test environment (XP) and here's how my code looks: function getMulti(array $keys) { $items = $this->memcache->get($keys); return $items; } My memcache servers are two local computers in the LAN that my dev. environment is connected to. Sure, I can turn the error logging off or just put an @ before the get function call, but that doesnt solve this issue. What can I do? Thanks a lot!

    Read the article

  • Mongrel_rails can't find memcache-client

    - by tonisep
    We started to use memcache-client in our rails app and it works just fine with "script/server" but "mongrel_rails start" fails with an error. In environment.rb we define "memcache-client" and version "1.8.1". Gem list shows that the gem is installed: memcache-client (1.8.1). If run with "script/server" everything works but with "mongrel_rails start" it fails with error: no such file to load -- memcache-client Any advice what could be wrong here? Is there something different in the way mongrel_rails loads the gems compared to script/server? Or is my setup just broken?

    Read the article

  • NoSQL replacement for memcache

    - by Juan Antonio Gomez Moriano
    We are having a situation in which the values we store on memcache are bigger than 1MB. It is not possible to make such values smaller, and even if there was a way, we need to persist them to disk. One solution would be to recompile the memcache server to allow say 2MB values, but this is either not clean nor a complete solution (again, we need to persist the values). Good news is that We can predict quite acurately how many key/values pair we are going to have We can also predict the total size we will need. A key feature for us is the speed of memcache. So question is: is there any noSQL replacement for memcache which will allow us to have values longer than 1MB AND store them in disk without loss of speed? In the past I have used tokyotyrant/cabinet but seems to be deprecated now. Any idea?

    Read the article

  • Exception in Google App Engine (Java) while trying to create Memcache Object

    - by Shreeni
    I am coming back to an old Google App Engine project on which I saw a bug. During this lag, I have been upgrading my AppEngine SDK and is now set at 1.3. When I try to run the same project again, I see the following exception: java.lang.NoSuchMethodError: com.google.apphosting.api.ApiProxy$Environment.getDefaultNamespace()Ljava/lang/String; at com.google.appengine.api.NamespaceManager.get(NamespaceManager.java:56) at com.google.appengine.api.memcache.MemcacheServiceImpl.setNamespace(MemcacheServiceImpl.java:181) at com.google.appengine.api.memcache.MemcacheServiceImpl.(MemcacheServiceImpl.java:145) at com.google.appengine.api.memcache.MemcacheServiceFactory.getMemcacheService(MemcacheServiceFactory.java:25) The line causing the problem is: CacheManager.getInstance().getCacheFactory().createCache(Collections.emptyMap()); (It is the same line as suggested by the AppEngine documentation to create a memcache object. It used to work fine previously. ) Any suggestions on how to fix it?

    Read the article

  • phpmyadmin displays blank page after installing apc and memcached

    - by Nbrochu
    ii am running a lamp stack on centos 5.6 with php 5.3. i had installed phpmyadmin and it work. i was able to log in and do anything. Then i installed memcached and its php extension as well as apc and its php extension. i have restarted httpd and php info says that memcache and apc are installed and configured. My question is, why does php my admin now display a blank page after installing memcache and apc.

    Read the article

  • Using memory-based cache together with conventional cache

    - by Industrial
    Hi! Here's the deal. We would have taken the complete static html road to solve performance issues, but since the site will be partially dynamic, this won't work out for us. What we have thought of instead is using memcache + eAccelerator to speed up PHP and take care of caching for the most used data. Here's our two approaches that we have thought of right now: Using memcache on all<< major queries and leaving it alone to do what it does best. Usinc memcache for most commonly retrieved data, and combining with a standard harddrive-stored cache for further usage. The major advantage of only using memcache is of course the performance, but as users increases, the memory usage gets heavy. Combining the two sounds like a more natural approach to us, even though the theoretical compromize in performance. Memcached appears to have some replication features available as well, which may come handy when it's time to increase the nodes. What approach should we use? - Is it stupid to compromize and combine the two methods? Should we insted be focusing on utilizing memcache and instead focusing on upgrading the memory as the load increases with the number of users? Thanks a lot!

    Read the article

  • Eclipse+PyDev+GAE memcache error

    - by bocco
    I've started using Eclipe+PyDev as an environment for developing my first app for Google App Engine. Eclipse is configured according to this tutorial. Everything was working until I start to use memcache. PyDev reports the errors and I don't know how to fix it: Error: Undefined variable from import: get How to fix this? Sure, it is only PyDev checker problem. Code is correct and run on GAE. UPDATE: I'm using PyDev 1.5.0 but experienced the same with 1.4.8. My PYTHONPATH includes (set in Project Properties/PyDev - PYTHONPATH): C:\Program Files\Google\google_appengine C:\Program Files\Google\google_appengine\lib\django C:\Program Files\Google\google_appengine\lib\webob C:\Program Files\Google\google_appengine\lib\yaml\lib UPDATE 2: I took a look at C:\Program Files\Google\google_appengine\google\appengine\api\memcache\__init__.py and found get() is not declared as memcache module function. They use the following trick to do that (I didn't hear about such possibility): _CLIENT = None def setup_client(client_obj): """Sets the Client object instance to use for all module-level methods. Use this method if you want to have customer persistent_id() or persistent_load() functions associated with your client. Args: client_obj: Instance of the memcache.Client object. """ global _CLIENT var_dict = globals() _CLIENT = client_obj var_dict['set_servers'] = _CLIENT.set_servers var_dict['disconnect_all'] = _CLIENT.disconnect_all var_dict['forget_dead_hosts'] = _CLIENT.forget_dead_hosts var_dict['debuglog'] = _CLIENT.debuglog var_dict['get'] = _CLIENT.get var_dict['get_multi'] = _CLIENT.get_multi var_dict['set'] = _CLIENT.set var_dict['set_multi'] = _CLIENT.set_multi var_dict['add'] = _CLIENT.add var_dict['add_multi'] = _CLIENT.add_multi var_dict['replace'] = _CLIENT.replace var_dict['replace_multi'] = _CLIENT.replace_multi var_dict['delete'] = _CLIENT.delete var_dict['delete_multi'] = _CLIENT.delete_multi var_dict['incr'] = _CLIENT.incr var_dict['decr'] = _CLIENT.decr var_dict['flush_all'] = _CLIENT.flush_all var_dict['get_stats'] = _CLIENT.get_stats setup_client(Client()) Hmm... Any idea how to force PyDev to recognize that?

    Read the article

  • MemCache-repcached compile error

    - by Ramy Allam
    I'm trying to install [memcached-1.2.8-repcached-2.2.1]( http://sourceforge.net/projects/repcached/files/latest/download?source=files) And I have the following error after running the make command: make all-recursive make[1]: Entering directory `/usr/local/src/pro/memcached-1.2.8-repcached-2.2.1' Making all in doc make[2]: Entering directory `/usr/local/src/pro/memcached-1.2.8-repcached-2.2.1/doc' make[2]: Nothing to be done for `all'. make[2]: Leaving directory `/usr/local/src/pro/memcached-1.2.8-repcached-2.2.1/doc' make[2]: Entering directory `/usr/local/src/pro/memcached-1.2.8-repcached-2.2.1' gcc -DHAVE_CONFIG_H -I. -DNDEBUG -g -O2 -MT memcached-memcached.o -MD -MP -MF .d eps/memcached-memcached.Tpo -c -o memcached-memcached.o test -f 'memcached.c' || echo './'memcached.c memcached.c: In function ‘add_iov’: memcached.c:697: error: ‘IOV_MAX’ undeclared (first use in this function) memcached.c:697: error: (Each undeclared identifier is reported only once memcached.c:697: error: for each function it appears in.) make[2]: * [memcached-memcached.o] Error 1 make[2]: Leaving directory `/usr/local/src/pro/memcached-1.2.8-repcached-2.2.1' make[1]: * [all-recursive] Error 1 make[1]: Leaving directory `/usr/local/src/pro/memcached-1.2.8-repcached-2.2.1' make: * [all] Error 2 OS : Centos5.7 64bit gcc-4.1.2-51.el5 gcc-c++-4.1.2-51.el5 libgcc-4.1.2-51.el5 Note : Memcached and memcache extension for php are already installed root@server[~]# memcached -h memcached 1.4.5 php ext http://pecl.php.net/get/memcache-2.2.6.tgz

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >