Deputy mayor resigns over 'failure of the system'