Thanks for using Bitnami. Could you please give us more information about your server? Did you add any plugin to your Magento website? Have you modified anything apart from adding products? Do you know if your site was under heavy load (for example, too many clients visiting your application at the same time) when you get the 504 error?
We have a Support Tool that will gather relevant information for us to analyze your configuration. Could you please download and execute it on the machine where the stack is running by following the steps described in the guide below?
How to Run the Bitnami Support Tool
Please note that you need to paste the code outputted by the tool in your reply.