mirror of
https://github.com/vichan-devel/vichan.git
synced 2025-01-18 09:04:44 +01:00
Fixed weird bug with ?/debug/sql trying to allocate a few GB on some instances. Assuming bug with APCu.
This commit is contained in:
parent
39be89ba49
commit
fcbc211314
@ -2363,7 +2363,13 @@ function mod_debug_apc() {
|
|||||||
if ($config['cache']['enabled'] != 'apc')
|
if ($config['cache']['enabled'] != 'apc')
|
||||||
error('APC is not enabled.');
|
error('APC is not enabled.');
|
||||||
|
|
||||||
$cached_vars = new APCIterator('user', '/^' . $config['cache']['prefix'] . '/');
|
$cache_info = apc_cache_info('user');
|
||||||
|
|
||||||
|
// $cached_vars = new APCIterator('user', '/^' . $config['cache']['prefix'] . '/');
|
||||||
|
$cached_vars = array();
|
||||||
|
foreach ($cache_info['cache_list'] as $var) {
|
||||||
|
$cached_vars[] = $var;
|
||||||
|
}
|
||||||
|
|
||||||
mod_page(_('Debug: APC'), 'mod/debug/apc.html', array('cached_vars' => $cached_vars));
|
mod_page(_('Debug: APC'), 'mod/debug/apc.html', array('cached_vars' => $cached_vars));
|
||||||
}
|
}
|
||||||
|
@ -5,19 +5,14 @@
|
|||||||
<th class="minimal">Created</th>
|
<th class="minimal">Created</th>
|
||||||
<th class="minimal">Expires</th>
|
<th class="minimal">Expires</th>
|
||||||
<th class="minimal">Size</th>
|
<th class="minimal">Size</th>
|
||||||
<th>Value</th>
|
|
||||||
</tr>
|
</tr>
|
||||||
{% for var in cached_vars %}
|
{% for var in cached_vars %}
|
||||||
<tr>
|
<tr>
|
||||||
<td class="minimal">{{ var.key }}</td>
|
<td class="minimal">{% if var.key %}{{ var.key }}{% else %}{{ var.info }}{% endif %}</td>
|
||||||
<td class="minimal">{{ var.num_hits }}</td>
|
<td class="minimal">{{ var.num_hits }}</td>
|
||||||
<td class="minimal">{{ var.creation_time|ago }} ago</td>
|
<td class="minimal">{{ var.creation_time|ago }} ago</td>
|
||||||
<td class="minimal">{{ (var.creation_time + var.ttl)|until }} (ttl: {{ var.ttl }}s)</td>
|
<td class="minimal">{{ (var.creation_time + var.ttl)|until }} (ttl: {{ (time() + var.ttl)|until }})</td>
|
||||||
<td class="minimal">{{ var.mem_size }} bytes</td>
|
<td class="minimal">{{ var.mem_size }} bytes</td>
|
||||||
<td style="word-wrap:break-word">
|
|
||||||
{% set value = var.value|json_encode %}
|
|
||||||
<code>{{ value[:80]|e('html') }}{% if value|length > 80 %}…{% endif %}</code>
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</table>
|
Loading…
x
Reference in New Issue
Block a user