A bioreactor comprising: an optical sensor holding device (11; 11'); a flexible bag; and an optical sensor comprising an optical sensor spot, said optical sensor holding device (11,11') comprising - a bag attachment part (31; 31') welded to the flexible bag the bag attachment part (31; 31') including an opening (34;34') into the bag; - an optical sensor attachment part (33; 33') made from a transparent material which is a different material to the material of the bag attachment part (31,33), the optical sensor comprising the optical sensor spot being attached to the optical sensor attachment part (33; 33'), wherein the optical sensor attachment part (33; 33') is a press fit into the opening (34;34') such that the sensor attachment part can be forced into the opening (34; 34') in the bag attachment part (31; 31') that is slightly smaller than the optical sensor attachment part (33; 33') and such that the optical sensor attachment part is kept firmly in place and leakage is minimized, whereby the optical sensor spot faces into the bag when the optical sensor attachment part is pressed into the opening; the bioreactor further comprising: an adapter external to the bag and attached to the optical sensor attachment part (33,33'); a mirror held by the adapter; and an optical fibre positioned for optical communication with the optical sensor via the mirror whereby the fibre is arranged essentially perpendicular to the direction of optical communication to the optical sensor via the transparent optical sensor attachment part (33; 33'). an optical sensor holding device (11; 11'); a flexible bag; and an optical sensor comprising an optical sensor spot, said optical sensor holding device (11,11') comprising - a bag attachment part (31; 31') welded to the flexible bag the bag attachment part (31; 31') including an opening (34;34') into the bag; - an optical sensor attachment part (33; 33') made from a transparent material which is a different material to the material of the bag attachment part (31,33), the optical sensor comprising the optical sensor spot being attached to the optical sensor attachment part (33; 33'), wherein the optical sensor attachment part (33; 33') is a press fit into the opening (34;34') such that the sensor attachment part can be forced into the opening (34; 34') in the bag attachment part (31; 31') that is slightly smaller than the optical sensor attachment part (33; 33') and such that the optical sensor attachment part is kept firmly in place and leakage is minimized, whereby the optical sensor spot faces into the bag when the optical sensor attachment part is pressed into the opening; - a bag attachment part (31; 31') welded to the flexible bag the bag attachment part (31; 31') including an opening (34;34') into the bag; - an optical sensor attachment part (33; 33') made from a transparent material which is a different material to the material of the bag attachment part (31,33), the optical sensor comprising the optical sensor spot being attached to the optical sensor attachment part (33; 33'), wherein the optical sensor attachment part (33; 33') is a press fit into the opening (34;34') such that the sensor attachment part can be forced into the opening (34; 34') in the bag attachment part (31; 31') that is slightly smaller than the optical sensor attachment part (33; 33') and such that the optical sensor attachment part is kept firmly in place and leakage is minimized, whereby the optical sensor spot faces into the bag when the optical sensor attachment part is pressed into the opening; the bioreactor further comprising: an adapter external to the bag and attached to the optical sensor attachment part (33,33'); a mirror held by the adapter; and an optical fibre positioned for optical communication with the optical sensor via the mirror whereby the fibre is arranged essentially perpendicular to the direction of optical communication to the optical sensor via the transparent optical sensor attachment part (33; 33'). an adapter external to the bag and attached to the optical sensor attachment part (33,33'); a mirror held by the adapter; and an optical fibre positioned for optical communication with the optical sensor via the mirror whereby the fibre is arranged essentially perpendicular to the direction of optical communication to the optical sensor via the transparent optical sensor attachment part (33; 33').