Getting an empty space in up sell items

The issue I was having was that the query calling the items was checking to see if the main item (i.e. the product the user clicked on) was in stock, not the actual up sell items. Can add code snippets later if needed

error establishing a database connection 3

I too had faced the same issue many times but after refreshing the browser it solved my problem. Kindly check the wp-config file and verify if the database name and other information is correct. Another thing you can try is restarting your local host.