What are the factors which affect the self purification process in river?

In developing countries most of the developmental activities are along the banks of the river, which increase the pollution threat to the ecosystem and its functioning too. Nature provides self healing system to all ecosystem but it doesn't work in most of the times?