I have problem updating contacts data.
I know it has to do something with Dedupe rule that I have to use but I don't know how to ensure myself that I won't have duplicates.
CiviCRM Stack Exchange is a question and answer site for administrators and users of the CiviCRM Constituent Relationship Management software. It only takes a minute to sign up.Sign up to join this community
Try to simplify in every way possible, until the 500 Server error no longer occurs. Then progressively make small changes to what you are doing (moving towards what you actually want to do) until the problem reoccurs. By doing this you will isolate the precise trigger of the problem.
Some things to try:
1) Use the default dedupe rule or an "email only" dedupe rule and try to import one new contact with just a minimum of information - perhaps just one new email address. Does that give a 500 error?
2) Try importing one new contact with name, email and address, while using different dedupe rules. Does the dedupe rule you use make a difference to whether the 500 occurs?
3) Try the same, but with information matching (exactly or partially) an existing contact.
A 500 error shows that something is going wrong in a way that civi has not anticipated might go wrong.
As Jonathan has already mentioned, you need to be a lot clearer on what your problem is and which approaches you have already tried to solve the problem.