One of our segment contains more pageviews than the "ALL VISITS" segment

The segment is supposed to track visits for a specific section of our website (PAGE URL contains "com*******/d* (not literally *, I am just being overly cautious to remain anonymous)), but “All visits” contains more pages views when comparing both. How is this even possible? Does this make our data meaningless or is it just a quirk of Matomo’s segments?

In order to help you, what is this report?

My screenshot was taken from the webapp at Behaviour → Pages (The columns are PAGE URL, PAGEVIEWS, ans UNIQUE PAGEVIEWS). It is comparing the default segment (All visits and Ca*****s)
I can also retrieve these numbers from the API with Actions.getPageUrls with the columns label, nb_hits, and nb_visits

On which period? (day/week/month/year - including today or not?)

Over the period of a previous month. So not including today.

Can you check also on weeks fully included in the month? and also in days at the beginning / ending of the month and included in weeks over 2 months? And check the sum?

I did as you ask for the month of January 2022. I calculated the sum of fully contained week + remaining days (All visit: 165017, Segment: 206273) and I got less page views than the month (All visits: 188337, Segment: 234942). When doing the sum of all weeks even if they only had a few days in that month, I got way more page views for both (as expected).

More worrying, no matter the week or day chosen, the segment got more pageviews than All Visits, except for January second where All Visits received more views. We had memory issues with the server running Matomo and I am starting to wonder if that could have impacted our data.

Probably…
Did you fix the memory issue?
If yes, then you have to invalidate archived data (ie data used by reports) for each day, week and month of January in order to make Matomo re-process the reports:

→ you should targer the month of January and add the &cascadeDown=1 parameter

I had time to look more into it yesterday and realized that the “All Visits” segment has close to 30% of its pageviews kept under “Other” (https://matomo.org/faq/how-to/faq_54/). Would it be possible that some of “/d***” child pages to be hidden under “Other”? That would also explain the numbers I got when calculating by weeks.
But we should definitely re-compute some of our reports.
Edit: I double checked the memory issue. It didn’t impact the instance in charge of computing the reports, only the smaller one we use for the API.