phpmemadmin
phpmemadmin copied to clipboard
Error to load page with data
Try to load - index.php?action=4&host=127.0.0.1:11211
Result: 504 Gateway Time-out.
I have some data in memcache, but i think there is not a lot. Can i limit data loading?
Currently not. I will add a limit parameter today. I just need to check for a good implementation.
Can you please provide some environment information:
- version of memcached
- which client was used to write those data Memcached or Memcache Extension?)
- PHP version
- OS
Thank you.
Memcached - 1.4.14 php memcache module PHP 5.6.5 Ubuntu 14.04
see: https://github.com/clickalicious/phpMemAdmin/issues/7#issuecomment-73711575
I've updated Memcached.php just a few seconds ago. Try to update phpMemAdmin's composer dependencies (Memcached.php) - make sure to use >= v0.3.2
composer update
should do the trick.
I've updated to v0.3.2, but still have error.
When i restart memcache (memcache has no data), page is loaded. When memcache has data, page not loaded.
May be this can help you to define problem
echo "stats items" | nc 127.0.0.1 11211
STAT items:4:number 1
STAT items:4:age 36
STAT items:4:evicted 0
STAT items:4:evicted_nonzero 0
STAT items:4:evicted_time 0
STAT items:4:outofmemory 0
STAT items:4:tailrepairs 0
STAT items:4:reclaimed 0
STAT items:4:expired_unfetched 0
STAT items:4:evicted_unfetched 0
STAT items:5:number 3
STAT items:5:age 36
STAT items:5:evicted 0
STAT items:5:evicted_nonzero 0
STAT items:5:evicted_time 0
STAT items:5:outofmemory 0
STAT items:5:tailrepairs 0
STAT items:5:reclaimed 0
STAT items:5:expired_unfetched 0
STAT items:5:evicted_unfetched 0
STAT items:6:number 5
STAT items:6:age 231
STAT items:6:evicted 0
STAT items:6:evicted_nonzero 0
STAT items:6:evicted_time 0
STAT items:6:outofmemory 0
STAT items:6:tailrepairs 0
STAT items:6:reclaimed 0
STAT items:6:expired_unfetched 0
STAT items:6:evicted_unfetched 0
STAT items:7:number 1
STAT items:7:age 230
STAT items:7:evicted 0
STAT items:7:evicted_nonzero 0
STAT items:7:evicted_time 0
STAT items:7:outofmemory 0
STAT items:7:tailrepairs 0
STAT items:7:reclaimed 0
STAT items:7:expired_unfetched 0
STAT items:7:evicted_unfetched 0
STAT items:8:number 1
STAT items:8:age 231
STAT items:8:evicted 0
STAT items:8:evicted_nonzero 0
STAT items:8:evicted_time 0
STAT items:8:outofmemory 0
STAT items:8:tailrepairs 0
STAT items:8:reclaimed 0
STAT items:8:expired_unfetched 0
STAT items:8:evicted_unfetched 0
STAT items:9:number 1
STAT items:9:age 230
STAT items:9:evicted 0
STAT items:9:evicted_nonzero 0
STAT items:9:evicted_time 0
STAT items:9:outofmemory 0
STAT items:9:tailrepairs 0
STAT items:9:reclaimed 0
STAT items:9:expired_unfetched 0
STAT items:9:evicted_unfetched 0
STAT items:13:number 1
STAT items:13:age 230
STAT items:13:evicted 0
STAT items:13:evicted_nonzero 0
STAT items:13:evicted_time 0
STAT items:13:outofmemory 0
STAT items:13:tailrepairs 0
STAT items:13:reclaimed 0
STAT items:13:expired_unfetched 0
STAT items:13:evicted_unfetched 0
END
Pretty cool - with your data i can debug a bit better what happens. Try to dig into this problem as soon as I'm back home.
Currently not sure if the data differs from the response I get from my Memcached instance and some others I've tried while developing.
When i have time, i can try to debug Memcached.php, may be i can find problem. if i find a problem, let you know.
Same error. Not opens data on localhost connection
Same error too.
same error Memcached version: 1.4.13 PHP version: 5.4.39-1~dotdeb.1 (cli) (built: Mar 22 2015 08:00:19) OS: Debian GNU/Linux 7.8 (wheezy)
Fatal error: Maximum execution time of 300 seconds exceeded in
/usr/share/phpmemadmin/vendor/clickalicious/memcached.php/lib/Clickalicious/Memcached/Client.php
on line 1041
// Dispatch command in some different ways ... depending on command ...
fwrite($socket, $data);
// Fetch while receiving data ...
while ((!feof($socket))) {
// Fetch Bytes from socket ...
$buffer .= fgets($socket, self::SOCKET_READ_FETCH_BYTES);
// Response max. 64 Bit value = 8 Bytes - We reed 256
Bytes at once so one round is definitive enough ;)
if ($command === self::COMMAND_INCR || $command ===
self::COMMAND_DECR) {
break;
}
foreach ($this->sigsEnd as $sigEnd) {
if (preg_match('/^' . $sigEnd . '/imu', $buffer)) {
// GOING DOWN HERE <==============
break 2;
}
}
}
// Check if response is parseable ...
if ($this->checkResponse($buffer) !== true) {
throw new Exception(
sprintf(
'Error "%s" while sending command "%s" to host "%s"',
$this->getLastResponse(),
$command,
$this->getHost() . ':' . $this->getPort()
)
);
}
// Parse the response and return result ...
return $this->parseResponse($command, $buffer);
}
Hi, any luck on finding the source of the problem yet ?
Yeah, error still exists
+1
+1
+1
Hi, problem in Multiline values check my fix https://github.com/aaarkadev/Memcached.php/commit/094205f9c1198b872c5029b5c6816bd7a6cea344
+1
@aaarkadev thanks for the fix, could you make a PR so that @clickalicious eventually merges it ?
if ini_get('memcached.compression_type') == 'fastlz' AND ini_get('memcached.compression_threshold') > SIZE of value page will hang.
mmm it doesn't run even with aaarkadev patch.. any news about fix?
Possibly have figured out, where is the problem:
- application collects all data from memcache, so it takes some time to be grabbed
- the logic of concatenating data is not rather optimized (small blocks of 256 bytes and 10 iterations with preg_match)
- the main problem is that (for unknown reason) last
fgets
takes too much time (last portion from socket with terminated signal, e.g.\r\nEND
) Possibly it is the issue with PHP...
The solution is to set timeout for opened socket: root/lib/Clickalicious/PhpMemAdmin/App.php:2276
protected function dumpEntries($host, $port, $namespace = null, $flat = false)
{
// Assume empty result
$result = array();
$client = $this->getMemcachedClient($host, $port, $this->getConfig()->timeout);
// Fetch all keys and all values ...
$client->timeout(1); # THIS LINE
$allSlabs = $client->stats(Client::STATS_TYPE_SLABS);
and
root/vendor/clickalicious/memcached.php/lib/Clickalicious/Memcached/Client.php:943
public function connect($host, $port, $timeout = null)
{
$uuid = $this->uuid($host, $port);
if ($timeout === null) {
$timeout = $this->getTimeout();
}
// The error variables
$errorNumber = null;
$errorString = 'n.a.';
if (isset(self::$connections[$this->getPersistentId()][$uuid]) === false) {
if ($timeout !== null) {
$connection = @fsockopen(
$host,
$port,
$errorNumber,
$errorString,
$timeout
);
socket_set_timeout($connection, $timeout); # THIS LINE
} else {
Also it would be great, if DATA wouldn't load entire cache but only via limited portions.
unfortunately it doesn't solve the problem
Data page is still hanging unfortunately even with the attempted patches offered.
Are there any other memcached GUIs available?
- Have tried FastoNoSQL 1.10.0.0 but not showing me data once connected
- Keylord only has a console interface
@carltondickson https://github.com/hgschmie/phpmemcacheadmin