Disorders of cortisol production
Some medical disorders are related to abnormal cortisol production, such as:

Primary hypercortisolism (Cushings syndrome): excessive levels of cortisolSecondary hypercortisolism (pituitary tumor resulting in Cushings disease, pseudo-Cushings syndrome)
Primary hypocortisolism (Addisons disease, Nelsons syndrome): insufficient levels of cortisol
Secondary hypocortisolism (pituitary tumor, Sheehans syndrome)

Regulation
The primary control of cortisol is the pituitary gland peptide, ACTH, which probably controls cortisol by controlling the movement of calcium into the cortisol-secreting target cells. ACTH is in turn controlled by the hypothalamic peptide corticotropin-releasing hormone (CRH), which is under nervous control. CRH acts synergistically with arginine vasopressin, angiotensin II, and epinephrine. (In swine, which do not produce arginine vasopressin, lysine vasopressin acts synergistically with CRH.) When activated macrophages start to secrete IL-1, which synergistically with CRH increases ACTH, T-cells also secrete glucosteroid response modifying factor (GRMF), as well as IL-1; both increase the amount of cortisol required to inhibit almost all the immune cells. Immune cells then assume their own regulation, but at a higher cortisol setpoint. The increase in cortisol in diarrheic calves is minimal over healthy calves, however, and falls over time. The cells do not lose all their fight-or-flight override because of interleukin-1s synergism with CRH. Cortisol even has a negative feedback effect on interleukin-1—especially useful to treat diseases that force the hypothalamus to secrete too much CRH, such as those caused by endotoxic bacteria. The suppressor immune cells are not affected by GRMF, so the immune cells effective setpoint may be even higher than the setpoint for physiological processes.
Like a thermostat controlling a heater, the hypothalamus uses cortisol to turn off the heat once the production of cortisol matches the stress induced on the immune system. But in a severe infection or in a situation where the immune system is overly sensitized to an antigen (such as in allergic reactions) or there is a massive flood of antigens (as can happen with endotoxic bacteria) the correct set point might never be reached. Also because of downregulation of Th1 immunity by cortisol and other signaling molecules, certain types of infection, (notably Mycobacterium tuberculosis) can trick the body into getting locked in the wrong mode of attack, using an antibody-mediated humoral response when a cellular response is needed. Lymphocytes are the antibody-producing cells of the body, and are thus the main agents of humoral immunity. A larger number of lymphocytes in the lymph nodes, bone marrow, and skin means the body is increasing its humoral immune response. Lymphocytes release antibodies into the bloodstream. These antibodies lower infection through three main pathways: neutralization, opsonization, and complement activation. Antibodies neutralize pathogens by binding to surface adhering proteins, keeping pathogens from binding to host cells. In opsonization, antibodies bind to the pathogen and create a target for phagocytic immune cells to find and latch onto, allowing them to destroy the pathogen more easily. Finally antibodies can also activate complement molecules which can combine in various ways to promote opsonization or even act directly to lyse a bacteria.