Hello Zian,
So you say that it works sometimes,
Did you check the mac entries and the arp entries before clearing the arp?
Please provide the following detail.
Switch interface config(interface connected to the server)
Any vlan config if exits.
Ip address and default gateway on the server
show ip arp when the ping works and does not work.
show mac-address add (mac add of server)
I will get back to you as soon as I can.