ACS712 max measuring voltage

i have a server and it draws a certain amount of current but sometimes if it gets hot it simply freezes and doesn't draw that amount, i want to measure its current and if it's less than the desired use a relay module to shut it down and restart it . is it possible for the ACS712 to measure current at home voltage i e about 230:240 volts ac ?
p.s
the maximum current drawn by the server is about 3 amps at 230 volts . is it possible to use the 5 amps version of ACS712 ?

The ACS712 is not rated for direct mains connection as far as I'm aware(*). Perhaps a current transformer
sensor would be better (no need to directly connect to mains then).

unfortunately i could not find any current transformer sensor in my country , only the ACS712 ? shall i buy and try ?

The ACS712 will work, but the sensor and more important the board that it's mounted on are not really rated for 240 mains voltage. That means it could kill you, or worse, kill someone else.
If you insist on using it, then at least connect it in the neutral line.

Did you search for "clamp current sensor" or "clip on current sensor".

Maybe you could measure a temp drop in the server's air stream with a DS18B20 temp sensor.
Leo..

thanks, i'll try the neutral line or the DS18B20

How is the neutral line going help? It will still see 240VAC and all of the current?

How are you going to setup the DS18B20 temperature sensor going to measure current?

i don't know about the neutral but the temp sensor if available would be used to detect change in temperature which means higher current

If the wire is getting hot enough to be detected by a sensor then your have a serious issue (fire).

Power = current * voltage [drop]. The voltage drop in a 1/2" piece of wire is micro-ohms, therefore the power is micro-watts thus not enough to raise the temperature.

Whatever current flows in the hot has to flow in the neutral. Current in = current out. If you have something that does not obey that law, let me know. I would like to get a patent on it.

Confusion about the temp sensor idea...
OP mentioned a server, consuming <=3Amp@230volt.
That server (computer) must have a cooling fan, blowing out warm air.
A non-working server could be blowing out air of a lower temp.
That can be measured against room temp with two DS18B20 temp sensors.

Confusion about the ACS712...
Many countries have polarised (one way connect) power plugs.
A bare sensor in the phase wire is potentially more dangerous than in the neutral wire.
Leo..

If all you need to do is measure the current on your server, then why not splice your ACS712 sensor into the DC side of your power supply, inside the server?

Wouldn't that meet your goal of measuring the server current and sidestep the dangers associated with high voltage.