@@ -54,3 +54,52 @@ http_access allow src_all
5454
5555# Unless the option's size is increased, an error will occur when uploading more than two files.
5656client_request_buffer_max_size 100 MB
57+
58+ ################################## Performance & Concurrency ###############################
59+ # Increase file descriptor limit for high concurrency
60+ max_filedescriptors 65536
61+
62+ # Timeout configurations for image requests
63+ connect_timeout 30 seconds
64+ request_timeout 2 minutes
65+ read_timeout 2 minutes
66+ client_lifetime 5 minutes
67+ shutdown_lifetime 30 seconds
68+
69+ # Persistent connections - improve performance for multiple requests
70+ server_persistent_connections on
71+ client_persistent_connections on
72+ persistent_request_timeout 30 seconds
73+ pconn_timeout 1 minute
74+
75+ # Connection pool and concurrency limits
76+ client_db_limit 1000
77+ server_idle_pconn_timeout 2 minutes
78+ client_idle_pconn_timeout 2 minutes
79+
80+ # Quick abort settings - don't abort requests that are mostly done
81+ quick_abort_min 16 KB
82+ quick_abort_max 16 MB
83+ quick_abort_pct 95
84+
85+ # Memory and cache optimization
86+ memory_cache_mode disk
87+ cache_mem 256 MB
88+ maximum_object_size_in_memory 512 KB
89+
90+ # DNS resolver settings for better performance
91+ dns_timeout 30 seconds
92+ dns_retransmit_interval 5 seconds
93+ # By default, Squid uses the system's configured DNS resolvers.
94+ # If you need to override them, set dns_nameservers to appropriate servers
95+ # for your environment (for example, internal/corporate DNS). The following
96+ # is an example using public DNS and SHOULD be customized before use:
97+ # dns_nameservers 8.8.8.8 8.8.4.4
98+
99+ # Logging format for better debugging
100+ logformat combined %ts.%03tu %6tr %>a %Ss/%03>Hs %<st %rm %ru %[un %Sh/%<a %mt
101+ access_log daemon:/var/log/squid/access.log combined
102+
103+ # Access log to track concurrent requests and timeouts
104+ logfile_rotate 10
105+
0 commit comments