Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

how much resources in server is required for small app with (10000 monthly visitors)?

default discord avatar
spyshark.last year
11

I tried deploying the application on AWS Amplify, it was returning an error OUT OF MEMORY,, Then I allocated 16GB RAM,, Still getting the same error,,


It is simple ecommerce app,



Is anyone had experienced similar problem??



What are the minimum resources required to deploy the website template?

  • default discord avatar
    carlosbensantlast year

    It will always depend on how well-structured and performant your app is.



    We designed a CRM for car dealerships. We currently have 200 MAU, and it's working fine so far on our Hetzner server (less than 100 USD).

  • default discord avatar
    rubixvilast year

    Either there's an error with the code or all the proper implementation is not in place.



    16gb of ram is WAY more than enough

  • default discord avatar
    spyshark.last year

    How can I find this error?


    Do i need to rebuild the application?

  • default discord avatar
    rubixvilast year

    if you have trouble use dokploy or coolify, self host that too



    and you'll realise deploying is EASY



    and also you don't run into out of memory issues

  • default discord avatar
    .jynzolast year

    For vps with coolify/dokploy you need 4 cores for build with low ram memory.


    At runtime depends if it is api heavy and what you cache.



    Alslo I tried with ngnix and pm2 without docker and nixpacks.


    It requires 2 cores build time wheter u turn off image optimization.



    So you need more cores and low memory.



    You gonna need ram memory for request memoization for example.



    If you deploy the db on the same server you need to calculate it additionally.



    Anyway i think we need more notes from nextjs and payload on the system requirements. Not everyone using vercel 😄



    For example for my ecommerse i will nextjs with local payloadcms, all on vps with 4 cores.


    Also I will deploy on dokploy and i will pay for dokploy cloud and will connect it to my hetzner server.


    Also dokploy soon will release build server feature(coolify have it) so my builds wont run on the prod server.



    Static pages on free cloudflare. You can purge csche when revalidate.



    I think this is the ultimate setup for mostly static ecommerse - 20 usd at max for everything host, db, s3



    if you use dokploy/coolify for prod i strongly rcommend to use their paid hosting that is very cheap so remove 2 cores from the needs. They host their admin on their infrastructure if you pay.

  • default discord avatar
    spyshark.last year

    Thanks

    @283289115745845249

    @187775044921982976

    @484398307343597569
  • default discord avatar
    rubixvilast year

    better to self host dokploy

  • default discord avatar
    spyshark.last year

    I'll try dokploy for next project. Right now client wants me to deploy on Amplify.



    I've successfully deployed the application but now when I try to access /admin,, I'm getting this error (Attached screenshot)



    any idea what could be the reason?

  • default discord avatar
    arseniyxlast year

    i would look server side logs to ensure why it happened

  • default discord avatar
    spyshark.last year
    @643450625421475860


    It was database connection issue, it was solved by adding this to payload.config.ts



    onInit: async (payload) => {
        console.log('Payload Initialized');
        try {
          // Log the MongoDB URI (but mask sensitive parts)
          const maskedURI = process.env.MONGODB_URI
            ? process.env.MONGODB_URI.replace(/:\/\/(.*?)@/, '://*****@')
            : 'No MongoDB URI found';
          console.log('Attempting connection with:', maskedURI);
    
          // The connection is handled by the adapter
          console.log('MongoDB connection successful');
        } catch (error) {
          console.error('Error during initialization:', error);
        }
      }

    `

  • default discord avatar
    philipisawesomelast year

    That's 1 visitor a every 26 seconds, theoretically; or it could be 100,000 all in a sec. The important thing is peak requests a second. But nextjs, with proper static prerendering, can handle a few thousand requests a second on a cheap setup.



    It really depends on what you are doing, but to me 16gb sounds like overkill.



    Also you shouldn't be building on the same server as deploying it

Star on GitHub

Star

Chat on Discord

Discord

online

Can't find what you're looking for?

Get dedicated engineering support directly from the Payload team.