 # Start a server process
 start = (env) ->
   worker = cluster.fork "NODE_ENV": env
+  # error record
   worker.on 'message', (err) ->
+    index = 0
+    length = 0
+    for key of errors
+      length++
+      index = key if (key isnt 'index') and (index is 0)
+    delete errors[index] if length > MAX_ERRS
     errors.index++
     errors[errors.index] = err
+  # start process
   pid = worker.process.pid
   date = new Date()
   year = date.getFullYear()

workers = {}

# Store all errors
errors = { index: 0 }

# Show help infomations.


# Dispaly error infomation
error = (ids) ->
  if ids.length > 0
    max = ids[0]
    # max number of error log
    if max.indexOf('+') is 0
      max = parseInt max.substr 1
      max = 20 if isNaN max
      # delete overflow
      length = (index for index of errors).length - 1
      for key of errors
        if (key isnt 'index') and (length > max)
          delete errors[key]
          length--
      MAX_ERRS = max
      return console.log 'Record up to %s errors\n', style.int max
    # select error by id
    for id in ids
      fixed = false
      if id.indexOf('-') is 0
