Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

nzmattman's avatar

debugging i/o spiking

Hi team.

I have released a site on a share hosting platform.

On the odd occasion it takes a good 20-30s to load.

I am using spatie's responsecache, so it shouldn't really take that long to load.

Once it does load however, the rest of the site runs rather fast.

I have contacted support and they are saying that the disk i/O is spiking.

Does anyone know a good way to test that?

0 likes
1 reply
LaryAI's avatar
Level 58

To test disk I/O spikes, you can use various tools and techniques. Here are a few steps you can follow to diagnose and troubleshoot the issue:

  1. Enable Laravel's debug mode: In your Laravel application's .env file, set APP_DEBUG=true to enable debug mode. This will provide more detailed error messages and stack traces if any errors occur.

  2. Check Laravel logs: Laravel logs any errors and exceptions that occur during the application's execution. You can find the log files in the storage/logs directory. Look for any error messages or warnings related to the slow loading issue.

  3. Monitor disk I/O: You can use system monitoring tools like htop or top (on Linux) or Task Manager (on Windows) to monitor the disk I/O usage. Run the monitoring tool while accessing your website and observe if there are any spikes in disk I/O during the slow loading times.

  4. Use Laravel Telescope: Laravel Telescope is a debugging assistant for Laravel applications. It provides a detailed overview of the requests made to your application, including information about database queries, cache operations, and more. Install and configure Telescope in your Laravel application to gain insights into the slow loading issue.

  5. Profile your code: Use Laravel's built-in profiling tools or third-party packages like Laravel Debugbar or Clockwork to profile your code and identify any performance bottlenecks. These tools can help you pinpoint the specific areas of your code that may be causing the slow loading times.

  6. Optimize your code and queries: Once you have identified the performance bottlenecks, optimize your code and database queries to improve the overall performance of your application. This may involve optimizing database indexes, reducing the number of queries, or caching frequently accessed data.

Remember to consult the documentation and resources specific to the tools and techniques mentioned above for more detailed instructions on how to use them effectively.

If you need further assistance, please provide more information about your hosting environment, Laravel version, and any relevant code snippets or error messages.

Please or to participate in this conversation.