Difference between revisions of "Drupal Performance"

From Wasya Wiki
Jump to: navigation, search
(part IV)
(part IV)
Line 35: Line 35:
 
Interpretation:
 
Interpretation:
 
* high request_time + high upstream_*
 
* high request_time + high upstream_*
  → backend app is slow
+
**  → backend app is slow
 
* high request_time + no upstream times
 
* high request_time + no upstream times
  → nginx/static filesystem issue
+
**  → nginx/static filesystem issue
 
* high upstream_connect_time
 
* high upstream_connect_time
  → nginx struggling to reach upstream
+
**  → nginx struggling to reach upstream
 
* high upstream_header_time
 
* high upstream_header_time
  → app slow before first byte
+
**  → app slow before first byte

Revision as of 01:48, 8 May 2026

Add these to settings.php:

 $settings['cache']['bins']['render'] = 'cache.backend.database'
 $settings['cache']['bins']['dynamic_page_cache'] = 'cache.backend.database'
 $settings['cache']['bins']['page'] = 'cache.backend.database'


reconfigure /etc/mysql/conf.d/docker.conf

 [mysqld]
 # skip-host-cache
 # skip-name-resolve
 max_connections = 300

part IV

See how long the request takes:


 curl -o /dev/null -s \
   -w 'dns=%{time_namelookup} connect=%{time_connect} tls=%{time_appconnect} ttfb=%{time_starttransfer} total=%{time_total}\n' \
   https://piousbox.com/issues/2025q2-issue

Add nginx log temporarily:

 log_format timing '$remote_addr - $request '
                 'rt=$request_time '
                 'urt=$upstream_response_time '
                 'uht=$upstream_header_time '
                 'uct=$upstream_connect_time';
 #
 access_log /var/log/nginx/timing.log timing;

Interpretation:

  • high request_time + high upstream_*
    • → backend app is slow
  • high request_time + no upstream times
    • → nginx/static filesystem issue
  • high upstream_connect_time
    • → nginx struggling to reach upstream
  • high upstream_header_time
    • → app slow before first byte