Nuxt deployment on Digital Ocean API calls EXTREMELY slow

Hey guys so I just deployed my app to Digital Ocean following the official documentation and it is painfully slow on the api folder calls. I have also confirmed that it is not even using 30% of the available cpu/memory, it is something related to the app itself. Can someone please help me?
2 Replies
kapa.ai
kapa.ai13h ago
Hi @José Machado. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Based on the information provided in the knowledge sources, I don't have enough specific details to directly address the issue of slow API calls on a Digital Ocean deployment for Nuxt. However, I can offer some general insights and suggestions that might help you troubleshoot the performance issue: 1. Server Configuration: Ensure that your Nginx configuration is properly set up for both your Nuxt frontend and Laravel backend. The knowledge sources include an example of Nginx configuration for a Nuxt and Laravel setup on Digital Ocean, which might be helpful to review and compare with your current configuration. Stack Overflow Post 2. Rendering Mode: Check your rendering mode. If you're using universal rendering (which is the default for Nuxt), make sure your server-side rendering is optimized. You might want to consider using hybrid rendering with route rules to cache certain routes or API responses. Docs > Guide > Concepts > Rendering 3. Payload Optimization: Large payloads can slow down your application. Consider optimizing your payload size. The YouTube video "Nuxt 3: Reduce the size of your payload and NUXT" might provide useful tips on this. YouTube [Nuxt 3]: Reduce the size of your payload and NUXT 4. Database Queries: If your API calls involve database queries, ensure they are optimized. The Nuxt Content documentation mentions using SQLite for efficient content storage and querying. While this might not directly apply to your setup, it emphasizes the importance of efficient data retrieval. Docs > Advanced 5. Monitoring and Profiling: Use the Nuxt DevTools, particularly the Hooks tab, to monitor the time spent in each hook. This can help identify performance bottlenecks. Guide > Hooks 6. Vite Optimization: Recent Nuxt updates have focused on improving Vite's warmup mechanism and build performance. Ensure you're using the latest stable version of Nuxt to benefit from these optimizations. Github Pull Request If these general suggestions don't help, you might need to provide more specific information about your application structure, API implementation, and the exact nature of the slowdowns you're experiencing for a more targeted solution. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai13h ago
<@1097818115271823411> Kapa.ai is still learning and improving, please let me know how I did by reacting below.

Did you find this page helpful?