There is an architectural issue in the angular -> API design which means 
that a very large number of calls are made to the API for each page load.  

This also makes the logs very noisy.

I have found 16GB lean for DSpace 7.5 where the database is on the same 
server.     Tomcat needs about 3G,  Each pm2 takes about 1G and SOLR and 
postgres chew up a lot.  ClamAV daemon can chew up another 2G.

 You might want to *reduce* the number of pm2 instances as you may be 
running low on memory.   If your system is starting to swap this can slow 
things down terribly.

Adjust the robots to block entity paths and browse paths as robots can get 
lost in the DSpace search (a historical problem).

The following can help show where traffic is coming from

cat access.log | grep -v " 403 " | grep -v " 301 "  grep -v " 408 " | cut 
-d " " -f 1 | sort | uniq -c | sort -n  

Unfortunately you will find that a lot of the traffic is to the API server 
but you can identify bots this way.

fail2ban is a useful tool to block sim-behaving bots.

IMHO DSpace7 needs a bit more work architecturally to improve 
performance.    That is understandable, it is huge (and impressive) 
migration that has been completed from DSpace 6.   The new version is a 
very fresh and nice design, and the new API is nice.

Edmund Balnaves
Prosentient Systems

On Tuesday, June 27, 2023 at 5:57:38 AM UTC+10 Karol wrote:

> Hi,
>
> I have implemented dspace7 in production, I have 4vCPU 16 Gb ram . I start 
> angular using all cpu pm2 -i max, but the performance of the whole site is 
> very bad. Now I can see my apache logs are growing fast: access.log and 
> dspace.log - probably bots are indexing new content and this is killing my 
> site, and real users can't submit work and use the repository. 
> Unfortunately, I can't tell 100% what or who is overloading the system, 
> because the apache logs show my server address (probably by using a proxy 
> for angular)
>
> * "top" shows 130% CPU 20% ram node 
> /dspace-angular-7.5/dist/server/main.js - this is where I'm looking for a 
> performance problem.
>
> * Apache access.logs per day take up 400 MB - I see continuous logging, 
> but I can't tell from which IP addresses. The dspace log: dspace.log 300MB 
> per day.
>
> 1) How can I increase the performance of angular: node 
> /dspace-angular-7.5/dist/server/main.js ? (I already use pm2 -i max)   
>
> 2) How can I check from which addresses are so many requests flying to 
> dspace7 ?
>
>
> Thanks and best regards,
>
> Karol
>

-- 
All messages to this mailing list should adhere to the Code of Conduct: 
https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx
--- 
You received this message because you are subscribed to the Google Groups 
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dspace-tech+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dspace-tech/e86e92be-0577-4e9c-a851-fbeff5feb4bfn%40googlegroups.com.

Reply via email to