I personally would first try to resolve the connection issue. The logs are warning of too many connections. After that I would start debugging the cache control.

Can you limit your connections from your script to see if there is a consistent throttle in place?

-Jason

On Jul 9, 2010, at 5:15 AM, Marcin Bazydlo <[email protected] > wrote:

Hi!
We investigating ts as alternative proxy for developing some modules as university projects. But as with API everything (almost) works fine I have little problem with understanding how caching occurs. Can anyone explain to me my doubts or at least point to place in manual which I overseen trying to understand them.

1. I have following cgi-bin script linked in many instances as to create many urls:
#!/bin/bash
# disable filename globbing
set -f
echo "Content-type: text/html; charset=utf-8"
echo
echo
echo Test page $RANDOM:
#cat /usr/lib/cgi-bin/wp.html

When the last line is commented out caching occurs. When I turn it on ts stops caching pages. 'wp.html' is one of publicly accessible pages (wget www.wp.pl), it isn't too big in my opinion.

2. On other machine I managed to make it cache, but it doesn't always cache them after first access. Sometimes it needs few access to cache web page.

3. When we attack ts with too many connections it stops to respond. Even stopping attack doesn't make him responsive again. But manual restart makes.

--
For first to points:
I do understand that it is some kind of decision algorithm but there are two real questions:
1. How this algorithm works? And where it is explained?
2. How can I change default behaviour of ts cache?

For third point:
I do know that you use it in production environment. I hardly can belive that such thing would be acceptable in such environment. Is it possible that we have some bug in configuration that makes cop

Thanks for help.

Marcin 'gondar' Bazydlo

TEST ENVIRONMENT:
Web server: Apache2
Traffic Server: ts 2.1.1
OS: both Suse and Ubuntu Linux
Client: curl and jmeter

ts configs:
records.config:
CONFIG proxy.config.http.cache.http INT 1
CONFIG proxy.config.http.cache.ignore_client_no_cache INT 1
CONFIG proxy.config.http.cache.ims_on_client_no_cache INT 1
CONFIG proxy.config.http.cache.ignore_server_no_cache INT 1
CONFIG proxy.config.http.cache.cache_responses_to_cookies INT 1
CONFIG proxy.config.http.cache.ignore_authentication INT 0
CONFIG proxy.config.http.cache.cache_urls_that_look_dynamic INT 1
CONFIG proxy.config.http.cache.enable_default_vary_headers INT 0
CONFIG proxy.config.http.cache.when_to_revalidate INT 3
CONFIG proxy.config.http.cache.when_to_add_no_cache_to_msie_requests INT 0
CONFIG proxy.config.http.cache.required_headers INT 0
CONFIG proxy.config.http.cache.max_stale_age INT 604800
CONFIG proxy.config.http.cache.range.lookup INT 1

CONFIG proxy.config.cache.permit.pinning INT 0
CONFIG proxy.config.cache.ram_cache.size LLONG -1
CONFIG proxy.config.cache.ram_cache_cutoff LLONG 1048576
CONFIG proxy.config.cache.ram_cache.algorithm INT 1
CONFIG proxy.config.cache.ram_cache.compress INT 0
CONFIG proxy.config.cache.limits.http.max_alts INT 5
CONFIG proxy.config.cache.max_doc_size INT 0
CONFIG proxy.config.cache.enable_read_while_writer INT 0

remap.config:
map          http://hpc2:8080/      http://hpc3:8080/
reverse_map  http://hpc3:8080/  http://hpc2:8080/

storage.config:
var/trafficserver 2048M

/var/log/messages:
Jul 9 10:35:48 hpc2 traffic_server[13274]: {1102154064} WARNING: too many connections, throttling
Jul  9 10:43:57 hpc2 traffic_cop[13205]: (test) read timeout [180000 ]
Jul  9 10:43:57 hpc2 traffic_cop[13205]: server heartbeat failed [1]
Jul 9 10:45:49 hpc2 traffic_server[13274]: {1102154064} WARNING: too many connections, throttling Jul 9 10:46:01 hpc2 traffic_manager[13206]: {47733879989072} NOTE: [Alarms::signalAlarm] Skipping Alarm: 'too many connections, throttling'
Jul  9 10:47:07 hpc2 traffic_cop[13205]: (test) read timeout [180000 ]
Jul  9 10:47:07 hpc2 traffic_cop[13205]: server heartbeat failed [2]
Jul  9 10:47:07 hpc2 traffic_cop[13205]: killing server
Jul 9 10:47:07 hpc2 traffic_manager[13206]: {47733879989072} ERROR: [LocalManager::pollMgmtProcessServer] Server Process terminated due to Sig 9: Killed Jul 9 10:47:07 hpc2 traffic_manager[13206]: {47733879989072} ERROR: (last system error 2: No such file or directory) Jul 9 10:47:08 hpc2 traffic_manager[13206]: {47733879989072} ERROR: [Alarms::signalAlarm] Server Process was reset Jul 9 10:47:08 hpc2 traffic_manager[13206]: {47733879989072} ERROR: (last system error 28: No space left on device) Jul 9 10:47:09 hpc2 traffic_manager[13206]: {47733879989072} NOTE: [LocalManager::startProxy] Launching ts process Jul 9 10:47:09 hpc2 traffic_manager[13206]: {47733879989072} NOTE: [LocalManager::pollMgmtProcessServer] New process connecting fd '9' Jul 9 10:47:09 hpc2 traffic_manager[13206]: {47733879989072} NOTE: [Alarms::signalAlarm] Server Process born Jul 9 10:47:10 hpc2 traffic_server[13511]: NOTE: --- Server Starting --- Jul 9 10:47:10 hpc2 traffic_server[13511]: NOTE: Server Version: Apache Traffic Server - traffic_server - 2.1.1-unstable - (build # 689 on Jul 8 2010 at 09:17:48) Jul 9 10:47:10 hpc2 traffic_server[13511]: {46927973618656} STATUS: opened /tmp/CACHETEST/ts/var/log/trafficserver/diags.log Jul 9 10:47:10 hpc2 traffic_server[13511]: {46927973618656} NOTE: updated diags config Jul 9 10:47:12 hpc2 traffic_server[13511]: {46927973618656} WARNING: connection throttle too high, 10000 (throttle) + 192 (internal use) > 1024 (file descriptor limit), using throttle of 832 Jul 9 10:47:12 hpc2 traffic_server[13511]: {46927973618656} NOTE: cache clustering disabled Jul 9 10:47:12 hpc2 traffic_server[13511]: {46927973618656} NOTE: cache clustering disabled Jul 9 10:47:12 hpc2 traffic_server[13511]: {46927973618656} WARNING: Access logging to local log directory suspended - partition space is low. Jul 9 10:47:12 hpc2 traffic_server[13511]: {46927973618656} NOTE: logging initialized[7], logging_mode = 3 Jul 9 10:47:14 hpc2 traffic_server[13511]: {46927973618656} NOTE: traffic server running Jul 9 10:47:16 hpc2 traffic_server[13511]: {1080052048} NOTE: cache enabled
Jul  9 10:52:16 hpc2 traffic_cop[13205]: (test) read timeout [180000 ]
Jul  9 10:52:16 hpc2 traffic_cop[13205]: server heartbeat failed [1]
Jul  9 10:53:56 hpc2 traffic_cop[13205]: server heartbeat succeeded
<messages.log>

Reply via email to