As Sajeetharan rightly mentioned exceptions can cause buckets of problems and I like the good quotation. For symptoms exhibiting- the pages loading slowly and sometimes timeout.
Such problems is often generally caused by application level issues, such as:
- requests taking a long time.
- application using high memory/CPU
- application crashing due to an exception.
Just to isolate the issue, related to resource/infra - you can ensure "Always On" feature is enabled and you can scale-up the App Service plan.
Genererally - Troubleshooting such performance issues can be divided into three distinct tasks, in sequential order as mentioned in this very informative document (highlighting some of them here for clarity and convienence):
- Observe and monitor application behavior
- Collect data
- Mitigate the issue
App Service gives you various options at each step:
1A - Track Service health -Azure publicizes each time there is a service interruption or performance degradation.
1B - Monitor your app -This option enables you to find out if your application is having any issues.
1C - *Monitor web endpoint status -Endpoint monitoring configures web tests from geo-distributed locations that test response time and uptime of web URLs.
1D - Application performance monitoring using Extensions - You can also monitor your application performance by using a site extension.
2A - Enable web server diagnostics -you can enable logs such as- Detailed Error Logging, Failed Request Tracing & Web Server Logging
2B - Enable application diagnostics -collect application performance data from App Service
2C - You can enable the Application Insights Profiler to start capturing detailed performance traces.
2D - Remote Profiling is useful if the CPU usage of the process is high and your process is running slower than expected, or the latency of HTTP requests are higher than normal.
2E- Leverage Kudu console - Kudu is a diagnostic console, in case your application is throwing first-chance exceptions, you can use Kudu and the SysInternals tool Procdump to create memory dumps. These memory dumps are snapshots of the process and can often help you troubleshoot more complicated issues with your app.
3.Scale-up/Scale-out & Recycle - Based on the application requirement you can scale-up the resource and recycle/restart as necessary.
Apologies for the long response, just shared several options to narrow-down the issue. Hope the above information helps! Let us know how it goes we would be more than happy to help you investigate/rectify the issue further.